[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Having trouble with Cron

on 13:42 Tue 22 Mar, Ed Curtis (e_curtis@homes2see.com) 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
  ^ is your problem

Your cron spec specifies "run every minute, for the first hour, of every
day, of every month, and every weekday".

You would want to specify some specific minute:

1 1 * * *       root    /bin/backuppublishers

... says:  run on the first minute, of the first hour, ...

Dr. Ed Morbius, Chief Scientist /            |
  Robot Wrangler / Staff Psychologist        | When you seek unlimited power
Krell Power Systems Unlimited                |                  Go to Krell!

Reply to: