crontab by hand

| | Comments (0) |

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


Categories

Leave a comment

About this Entry

This page contains a single entry by Jeb published on September 17, 2003 10:30 PM.

The Light's In The Mail was the previous entry in this blog.

Mac OS X Unix Tips is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.31-en

Good Reads

Flickr Badge

www.flickr.com
This is a Flickr badge showing items in a set called Wallet. Make your own badge here.