Scheduling Tasks

The FreeBSD job scheduler, cron(8), allows the administrator to have the system run any command on a regular basis. If you need to back up your database nightly or reload the nameserver four times a day, cron is your friend. cron(8) configuration files are called crontabs and are managed with crontab(1). Every user has a separate crontab stored in /var/cron/tabs, and the global crontab file is /etc/crontab.

User Crontabs vs. /etc/crontab

The purpose of /etc/crontab is different from that of individual users' crontabs. With /etc/crontab, root may specify which user will run a particular command. For example, in /etc/crontab the sysadmin can say, "Run this job at 10 PM Tuesdays as root, and run this other job at 7 AM as www." Other ...

Get Absolute FreeBSD, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.