logo       

(clug-talk) Fun with Cron: msg#00121

org.user-groups.linux.calgary.general

Subject: (clug-talk) Fun with Cron

Hopefully this might help someone else avoid some troubles.....

I had setup a cron job to do a backup. I used the following line in my
crontab file:

* 02 * * * /root/cron/sysbackup

Well, it turns out that this will run the cron job every minute from 02:00am
to 02:59am. It should have been:

00 02 * * * /root/cron/sysbackup

this fires only at 02:00am.

My backup does an rsync of my data files into another directory, then
creates an ISO image and writes it to a CDRW. So, this process can take a
little while to happen. To have the backup process run every minute was
causing all sorts of fun - but the server DID handle it. I just couldn't
figure out why the CD would start ejecting and reloading every couple of
seconds at 2 in the morning.... (I wrote the backup script to NOT eject the
CD).

Anyways, hope this helps someone avoid similar issues.

Shawn



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise