Re: run script on cron job only run on first Saturdat every month???

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



On 08/04/2013 10:17 PM, zGreenfelder wrote:
> or... if it really has to be on the first Saturday and only on the first
> Saturday,
> then running something like
> 15 4 1-7 * *  /home/app/oracle/backup/monthlybk.sh
>
> with the top of the monthlybk.sh script doing soemthing like

No, really.  We went over this.  You don't have to modify your scripts. 
  You can put the "test" in the crontab.  John's example should work 
properly:

15 04 * * 6    test $(date +"%d") -le 07 && 
/home/app/oracle/backup/monthlybk.sh

Cron will run those commands every Saturday.  On the first Saturday in 
the month, "test" will succeed and the script will be run.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux