From the course: Ansible: From Basics to Guru by Pearson

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Scheduling jobs

Scheduling jobs

Another nice feature in Ansible Tower is a scheduled job. So what is the idea? Well, simple. A scheduled job allows you to run a job template on a cron-like schedule. And after job execution, the results can be consulted in completed jobs. So if you want a job to run every night or whatever, make it a scheduled job. Also, of course, you can use a notification template to send information about the success or failure of your job. That goes for anything in Ansible Tower, so that shouldn't be surprising you. If you want to use notifications, you will first need to create a notification template, and then you add it to a job template for execution. Let's go check this out. So how do we schedule a job? well, you go to the templates interface. And in the templates interface, you pick whichever job you want. So let's do this on my template. And there we can see that there is a schedule. So I am just going to add my schedule by clicking a plus, and let's call it daily. We need to specify a…

Contents