Scheduling Recurring Tasks with cron

Unix provides a service called cron that runs programs repeatedly on a fixed schedule. Most experienced administrators consider cron to be vital to the system because it can perform automatic system maintenance. For example, cron runs log file rotation utilities. You should know about cron not only in the interest of knowing about everything that runs on your system, but also because it is just plain useful.

You can run any program you like with cron, choosing the times that suit you. A program running through cron is called a cron job. To install a cron job, you need to create an entry line in your crontab file, usually with the crontab command. Here is a typical crontab file entry that runs a command daily ...

Get How Linux Works 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.