Chapter 8. Scheduling Tasks and Embedding Languages in Scripts
Until now, we learned about various useful shell utilities and how to write them into a shell script in order to avoid writing the same instructions again and again. Automating tasks by writing into scripts reduces the tasks up to a certain extent, but still we will have to run those scripts whenever required. Sometimes, it happens that we want to run a command or script at a particular time, for example, sysadmin has to run a clean-up and maintenance of a system available in the data center at 12:30 AM. To perform the required operation, sysadmin will login into a machine around 12:30 AM and do the necessary work. But what if his or her home network is down and the data center is far? It will be inconvenient and tough to perform a task at that moment. There are also a few tasks that need to be performed on daily or hourly basis, for example, monitoring the network usage of each user, taking a system backup, and so on. It will...