[CentOS] run script on cron job only run on first Saturdat every month???
Joseph Spenner
joseph85750 at yahoo.com
Tue Jul 30 21:42:46 UTC 2013
>From: mcclnx mcc <mcclnx at yahoo.com.tw>
>
>we have CENTOS 5.5 on DELL server. One of our script need run on first Saturday every month.
>
>We have following setup on cron job but it run every Saturday.
>
>15 04 1-7 * 6 /home/app/oracle/backup/monthlybk.sh
>
>Any one know how to fix it?
That's pretty clever, and it looks like it should work.
Maybe something is taking priority?
I'd try some experimentation. Try:
15 04 1-7 <today.day.number> 6 touch /tmp/foo.test
15 04 1-7 <today.day.number> * touch /tmp/foo.test
15 04 1-7 * * touch /tmp/foo.test
15 04 * * 6 touch /tmp/foo.test
etc.
It might take a while, but you'll find it eventually!
I had a similar problem with Debian, but it turned out to be a weird timezone issue confusing me.
More information about the CentOS
mailing list