[ Table of Contents ] [ Previous Chapter ] [ Next Chapter ] [ Index ]



Clock Service (Cron)

Cron executes commands at specified dates and times according to the instructions in the file tenon/etc/crontab. Commands may be Perl and Shell scripts, Apple scripts and applications, or any of the UNIX utilities listed in See Appendix G.

 

The crontab file consists of lines of seven fields each. The fields are separated by spaces or tabs. The first five fields are integer patterns to specify:

 

 

Each of these patterns may contain:

 

 

The sixth field is a user name -- the command will be run with that user's UID and permissions. The seventh field consists of all the text on a line following the sixth field, including spaces and tabs; this text is treated as a command which is executed by the Shell at the specified times. A percent character ("%") in this field is translated to a new-line character.

 

Lines beginning with a "#" are ignored by Cron.

 

The crontab file is checked by Cron every minute, on the minute.

 

Starting Cron

Check the Enable Cron checkbox in the Web Ten Preferences and restart Web Ten to start Cron:

 

 

Example crontab File

 

#Roll logs every day at midnight

 

0 0 * * * root /usr/local/etc/httpd/tenon/admin/LogRoller

 

#Run weekly script at 3:45AM on Saturday. Mail result to Administrator

 

45 3 * * 6 root /usr/local/etc/httpd/tenon/admin/weekly.pl 2>&1 | tee /usr/local/etc/httpd/tenon/logs/weekly.out | mail -s

"weekly output" you@yourserver.com

 

#Run monthly script on the 1st of the month at 5:30AM

 

30 5 1 * * root /usr/local/etc/httpd/tenon/admin/monthly 2>&1 | tee /usr/local/etc/httpd/tenon/logs/monthly.out | mail -s

"monthly output" you@yourserver.com

 



[ Table of Contents ] [ Previous Chapter ] [ Next Chapter ] [ Index ]