Book Image

Troubleshooting Ubuntu Server

By : Skanda Bhargav
Book Image

Troubleshooting Ubuntu Server

By: Skanda Bhargav

Overview of this book

Table of Contents (16 chapters)
Troubleshooting Ubuntu Server
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Scheduling jobs with cron


The cron system has brought relief to system administrators, without which they had to wake up and run jobs at specified times in order to run a server smoothly. For example, if there is a requirement to clear the /tmp directory every Sunday midnight before the business begins next day (Monday morning), it makes absolutely no sense for an administrator to be awake and carry out the job manually at midnight. Thanks to cron, jobs can now be scheduled, that is, they can start at scheduled times. cron and at are daemons that help achieve this. Linux's cron is a little different compared to that of Unix, as cron in Unix wakes only at the time when it has to launch a program.

The cron and at daemons should be installed by default on your Ubuntu Server. Systems are designed to check for user specified cron jobs in the /var/spool/cron directory, as shown in the following screenshot. Also, cron checks the /etc/crontab and the /etc/cron.d directory for computer jobs.

Let's...