Scheduling regularly occurring jobs with crontab

Suppose you want to send yourself a reminder message just before you go home at the end of each day—say, a reminder to turn off the coffeepot. Or, suppose you want to make a backup copy of specific files each week. You can do this by using crontab to schedule commands or scripts to run regularly at times you specify. In doing so, you can schedule tasks to occur on specific days at specific times, and know that the jobs will happen unattended (Figure 9.2).

Figure 9.2. The cron file, which is where you specify the cron job, opens in your default editor. If you've previously specified crontab jobs, they'll show up in the editor.

To schedule a regularly occurring job with crontab:

1.
 crontab ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.