Create a crontab file like so (minus the # comments):
crontab -e # This will open your default text editor. Exapmle will assume vi
i #enter insert mode
0 5 * * 1-5 <cmdline> # where <cmdline> is the full path to the command to execute followed by what ever parameters it requires
<esc>:wq # exit edit mode, save and quit
This will save your crontab file. To view it, type "crontab -l". You can add as many cmdlines as you want.
A little explanation of the crontab file format (from the man 5 crontab pages):
Quote:
The time and date fields are:
field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)
|
Also, please note that all output of the executed command will appear in your email unless you pipe them to somewhere else. Ex:
0 5 * * 1-5 /usr/bin/play someaudio.wav >~/play.log 2>&1 # will play an audio file at 5:00am Monday through Friday, logging all output to a log file.
* * * * * /usr/games/fortune # send me an email every hour with my fortune
Hope this helps.