Re: Having trouble with Cron
On 22/03/11 17:42, Ed Curtis wrote:
Maybe someone can help out with this. I have a bash script I run at 1am
every morning via an entry in cron.d. It records an echo in a file when
done so I can record it running. The trouble I'm having with it is that
it's recording that's it has completed about once a minute from the hour
starting a 1 am until 2 am!. I'm not sure it's actually running that
entire time. I can't imagine that it would run exactly for a perfect
hour then stop. If I run the script by hand it only takes a few minutes
and records only one entry into my log file.
In /etc/cron.d/backuppublishers I have....
* 1 * * * root /bin/backuppublishers
The script is an rsync routine and an echo to my log file.
Yes. You have told your script to start every minute from 01:00 to
01:59. (* in the first field means *every* minute)
If you want the run to start only at 01:00, change your crontab entry to:
0 1 * * * root /bin/backuppublishers
i.e. Run at 0 minutes past the 1st hour, every day.