For those who don't know, crond allows you to execute arbitrary programs at given times of the day/week/month/year. This is useful if you want to do something like run fakecall.tcl every night so that your DVR service doesn't expire without a phoneline on a directivo, maybe run tivotitle.tcl every half hour, or wipelogs every night, etc.
Heres a quick howto for activating and using the included cron daemon:
First create some user definitions so that cron doesn't ignore your crontab:
Code:
echo "root:x:0:0:root:/:/bin/sh" >> /etc/passwd
echo "root:x:0:" >> /etc/group
Now prepare a crontab file in the hardcoded directory:
Code:
mkdir -p /var/spool/cron/crontabs
touch /var/spool/cron/crontabs/root
Now add your cron jobs (this example runs fakecall.tcl and clears the log files at 12:00 AM GMT every day):
Code:
echo "0 0 * * * fakecall.tcl" >> /var/spool/cron/crontabs/root
echo "0 0 * * * rm -rf /var/log/*" >> /var/spool/cron/crontabs/root
Or you can directly edit your crontab with your favorite editor.
Heres a quick reference for what a cron job should look like:
Code:
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (1 - 7) (monday = 1)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
You you can replace the asterisk with either a number, a sequence of numbers such as 1,3,5 (just the numbers one, three, and five) or a series of numbers such as 1-5 (every number from one through five)
Once you are done configuring it, make it run from your startup scripts:
Code:
echo "/tivo-bin/crond" >> /etc/rc.d/rc.sysinit.author
(substitute /tivo-bin with whatever directory you put the AIO archive in, if it is different)
Now you can also run it in your current session by just typing 'crond'.
Have fun.