Scheduling jobs
There are certain types of jobs that we need to execute periodically; taking a backup is one such job. Ansible allows us to schedule jobs at a set frequency or time.
How to do it...
- We can use an existing project and template, or create a new one following the previous recipe.
- On the
Templates
page, for the template that we want to schedule, we should click on the calendar icon. - A page with all the existing schedules will open. Since we are doing this for the first time, it would be empty for us. We need to click the
+ADD
button here. - Here, we can specify the
NAME
,START DATE
,START TIME
, andL
OCAL TIME ZONE
. - For daily execution, we can set the
REPEAT FREQUENCY
toDay
and set theEVERY
field to1
. If we want a task to be executed every alternate day, then this should be set to2
, and so on. - We can set an
END
to this schedule toNever
, or after a certain number of occurrences, or even after a particular date. - Lastly, we should verify the schedule description to ensure that everything...