View Single Post
Old 04-05-2004, 03:20 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,541
sde is on a distinguished road
CLI for noobies: stay regular with cron and crontab

OK, noobies, gather round. It's Monday morning. The regular time for another expedition into the land of Linux beyond the GUI. Your mother may have told you that it was good to be regular, but most likely she didn't tell you about how cron and crontab can help keep you that way.

Linux is really not designed to be turned on and off like Windows often is. In fact, it is almost assumed that you will leave your machine running 24x7, no matter whether you use it for an hour or for twelve hours a day.

Most distributions take advantage of that fact to schedule recurring maintenance jobs to be run while you're least likely to be around. Things like trimming system log files, for example. Otherwise they might eventually fill every byte of available disk space. That's where cron and crontab come in, and that's our topic for the week.

Cron is started at boot time, when it gathers up all the entries in the various system and user-level crontab files it knows about and loads their contents in memory. From then on, cron awakens once a minute to see if any of those tasks are due to be run at the current minute, hour, day of month, month of year, or day of week. Crontab is the program which is used to to create and to modify those various crontab files. Crontab has to be run before cron knows about any changes you may make to a crontab file.

Official Article Here
__________________
Mike
sde is offline   Reply With Quote