Automating tasks with cron
In this recipe we will investigate the role of server automation and the convenience of running specific tasks at predefined periods by introducing you to the time-based job scheduler known as cron.
Cron allows for the automation of tasks by enabling the administrator to determine a predefined schedule based on any hour, any day, or any month. It is a standard component of the CentOS operating system, and it is the purpose of this recipe to introduce you to the concept of managing recurring tasks in order to take advantage of this invaluable tool and to make CentOS work for you.
Getting ready
To complete this recipe you will require a minimal installation of the CentOS 6 operating system with root privileges and a console-based text editor of your choice.
How to do it...
The purpose of this recipe is to create a script that will write the time and date with a few words of your choice to a text file every fifteen minutes. This may seem to be a relatively simple exercise...