Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Just what the doctor ordered' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Just what the doctor ordered
Authored by: David on Jul 12, '02 03:58:29PM

So how do you edit the main hint?

Anyways, here is what I have done to enable an automatic cronjob at midnight.
I don't have a link to Cronnix, but it has been mentioned on this site before.

Here are the instructions for setting up a root cronjob.

Type this:

sudo pico /etc/crontab

Type in your admin password and ou will then get a window with your root cronjobs in it.

Here is what mine looks like:

# $NetBSD: crontab,v 1.13 1997/10/26 13:36:31 lukem Exp $
#
# /etc/crontab - root's crontab
#
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log

#min hour mday month wday user command

# Disabled by default, since it causes disk access every 10 minutes,
# which is useless unless you use at(1). Enable as needed.
#*/10 * * * * root /usr/libexec/atrun

# do daily/weekly/monthly maintenance
15 3 * * * root sh /etc/daily 2>&1 | tee /var ... (etc)
30 4 * * 6 root sh /etc/weekly 2>&1 | tee /var ... (etc)
30 5 1 * * root sh /etc/monthly 2>&1 | tee /var ... (etc)

# do the backup
00 0 * * * root /usr/local/bin/psync / /Volumes/Maxtor\ \(FW\)

The last line is what you are interested in.

The first set of zeros stand for minutes, the second for hours, and I forget what the other three are for
(you can check in man crontab).

After the stars comes who you want to run the job (you need root to so that your permissions will be kept).

Then comes the job. You have to specify where psync is because zsh (which is what root runs the cronjobs with)
doesn't have /usr/local/bin in its path.

Save the file (Control - O) and quit (Control - Q).

Any other questions?

David



[ Reply to This | # ]