What's he building in there?

September 17, 2003

crontab by hand

The system crontab text file controls events run by the UNIX system scheduler, CRON. It is found at /private/etc/chron. I used Cronnix to update it originally, but Cronnix quit working properly for some reason, so I just updated /private/etc/crontab directly using BBEdit after setting read/write for root using FileBuddy. (Update: I had pasted in a key with a line feed and did not see the extra text. Cleaning out the key fixed this, and Cronnix works fine now. )

Apple added the first 3 cleanup commands. I added the the daily Analog reports and the weekly dump of the MovableType SQL db to Yoda. That way I'll always have 5 backup copies of the source database. (I've masked the password for the mysql user here.)

I'll end up going to a daily 31 cycle and then a monthly 12 cycle. That will be 43 instances of a 1 meg and growing MYSQL dump.

Update: Using /network/ instead of /volumes/ because I can have a SAMBA volume automount as a network device, but not a volume.

SHELL = /bin/sh
PATH = /etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME = /var/log
0 20 * * * root periodic daily
15 11 * * 6 root periodic weekly
15 11 1 * * root periodic monthly
30 1 * * * root /usr/local/analog/analog
15 4 1 * * root /usr/local/bin/mysqldump -u mysql -p***** mov_type > /volumes/YODAMEDIA/MOV_TYPE/mov_type_1.sql
15 4 7 * * root /usr/local/bin/mysqldump -u mysql -p***** mov_type > /volumes/YODAMEDIA/MOV_TYPE/mov_type_7.sql
15 4 14 * * root /usr/local/bin/mysqldump -u mysql -p***** mov_type > /volumes/YODAMEDIA/MOV_TYPE/mov_type_14.sql
15 4 21 * * root /usr/local/bin/mysqldump -u mysql -p***** mov_type > /volumes/YODAMEDIA/MOV_TYPE/mov_type_21.sql
15 4 28 * * root /usr/local/bin/mysqldump -u mysql -p***** mov_type > /volumes/YODAMEDIA/MOV_TYPE/mov_type_28.sql

Posted by Jeb at September 17, 2003 10:30 PM

Comments
Post a comment












Remember personal info?


To avoid comment spam, you have to enter a password. Hint: Charlie's last name.