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