Chapter 10. cron and at

The cron and at packages provide Linux users with a method for scheduling jobs. at is used to run a job once. cron is used to run jobs on a schedule. If a report should be run every Friday at 8 p.m., cron is perfect for the job. If a user wants to run a sweep of the system to find a misplaced file, the job can be scheduled to run that evening using the at command.

This chapter explains how cron and at work. You might not be familiar with the anacron and kcron packages, but they extend the features of cron. We also explain these tools in this chapter. We show how to use cron and the other utilities, but we also show how they work and provide examples of what can go wrong.

This chapter is organized into the following sections:

  • cron The basics of cron are explained. The crontab command is used to submit and edit jobs. The reader will see the various crontab syntaxes and the format of the cron configuration file. The other files cron uses are explained as well. The cron daemon runs the jobs submitted with crontab. This topic details how the daemon gets started, where it logs, and the differences between cron packages. We also discuss a graphical front end to crontab called kcron.

  • anacron anacron is a utility to run jobs cron missed due to system downtime. Learn how it works in this section.

  • at at is a utility similar to cron that runs jobs once. We show examples of submitting, removing, and monitoring jobs with at.

We conclude the chapter with a section on four troubleshooting scenarios that demonstrate good methodologies for fixing problems with cron.

Linux Troubleshooting for System Administrators and Power Users
Real World Mac Maintenance and Backups
ISBN: 131855158
EAN: 2147483647
Year: 2004
Pages: 129
Authors: Joe Kissell

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: