[CentOS] run script on cron job only run on first Saturdat every month???
Robert Nichols
rnicholsNOSPAM at comcast.netMon Aug 5 13:25:30 UTC 2013
- Previous message: [CentOS] run script on cron job only run on first Saturdat every month???
- Next message: [CentOS] ghostscript-8.70-14.el5_8.1.x86_64 & hylafax+ 5.5.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/30/2013 04:58 PM, 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)
Definitely untested! You need to escape the "%" sign, since it is special
to cron. Plus, you need to prevent the date command from padding its
output with a leading zero, since that would result in the illegal octal
numbers 08 and 09:
15 04 * * 6 test $(date +"\%_d") -le 7 && /home/app/oracle/backup/monthlybk.sh
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
- Previous message: [CentOS] run script on cron job only run on first Saturdat every month???
- Next message: [CentOS] ghostscript-8.70-14.el5_8.1.x86_64 & hylafax+ 5.5.3
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list