crontab is the configuration file for the cron program, which is a
scheduler. 

Every minute, cron checks the crontab file to see if there's anything
there that should be launched.

the crontab format is like:

Minutes Hours DayOfMonth Months DayOfWeek Command

so

22 3 * * * updatedb

means that every day, even on weekends, the updatedb command will run
at 3:22 AM.

cron is great for doing repeated tasks, especially file maintenance,
backups, etc.  I use the following crontab entry to delete any
TrackStat backups older than 4 days:

10 3 * * * find /mnt/jukebox/playlist/ts/*.xml -mtime +4 -exec rm {} \;

crontab -l
will list the crontab file

crontab -e
allows you to edit the crontab file

crontab -r
will remove the crontab file for the current user account

I don't usually edit crontab directly.  What I do is us a separate file
for editing, called root.cron.  I make all crontab changes to this file
using the nano editor, then load it into crontab with the command:

crontab root.cron

hope this helps


-- 
Pale Blue Ego
------------------------------------------------------------------------
Pale Blue Ego's Profile: http://forums.slimdevices.com/member.php?userid=110
View this thread: http://forums.slimdevices.com/showthread.php?t=53440

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix

Reply via email to