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 Tuesday 30 July 2013 22:58:34 John R Pierce wrote:
> On 7/30/2013 2:32 PM, Keith Keller wrote:
> > 15 04 1-7 * 6 /home/app/oracle/backup/monthlybk.sh
> 
> maybe...
> 
> 	15 04 * * 6 test $(date +"%d") -le 07 &&
>  /home/app/oracle/backup/monthlybk.sh
> 
> (untested)

Run an incremental backup every day of the month except sundays

03 03 1-31 * * test `date +\%a` != Sun && /usr/local/bin/backup-rsch-
inc


Run a full backup on the first sunday of the month

07 03 1-7  * * test `date +\%a` =  Sun && /usr/local/bin/backup-rsch-
full


Tony



-- 
Linux mufc.tonyshome.ie 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 
23:51:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
_______________________________________________
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