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

2013-08-05 Thread Gordon Messmer
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

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

2013-08-05 Thread Robert Nichols
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 %

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

2013-08-05 Thread Les Mikesell
On Mon, Aug 5, 2013 at 2:00 AM, Gordon Messmer gordon.mess...@gmail.com wrote: 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

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

2013-08-05 Thread Miranda Hawarden-Ogata
On 2013/08/05 05:01, Les Mikesell wrote: On Mon, Aug 5, 2013 at 2:00 AM, Gordon Messmer gordon.mess...@gmail.com wrote: 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 * *

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

2013-08-04 Thread Mark LaPierre
On 07/30/2013 04:43 PM, mcclnx mcc wrote: 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?

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

2013-08-04 Thread Darr247
On 2013-08-04 2:59 PM, Mark LaPierre wrote: 15 4 1-7 * 7 /home/app/oracle/backup/monthlybk.sh Can you please point out what's wrong with 15 04 1-7 * 6 /home/app/oracle/backup/monthlybk.sh that makes it run every saturday instead of only the first saturday of the month? (Going by the

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

2013-08-04 Thread Keith Keller
On 2013-08-04, Darr247 darr...@gmail.com wrote: On 2013-08-04 2:59 PM, Mark LaPierre wrote: 15 4 1-7 * 7 /home/app/oracle/backup/monthlybk.sh Can you please point out what's wrong with 15 04 1-7 * 6 /home/app/oracle/backup/monthlybk.sh that makes it run every saturday instead of only

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

2013-08-04 Thread Darr247
On 2013-08-04 8:54 PM, Keith Keller wrote: We have already gone over this. The days columns are effectively ORed. So the above job runs every day from the 1st to the 7th, and every Saturday of the month. Read man 5 crontab to see this documented. --keith Right, but the proposed command

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

2013-08-04 Thread zGreenfelder
On Mon, Aug 5, 2013 at 12:45 AM, Darr247 darr...@gmail.com wrote: On 2013-08-04 8:54 PM, Keith Keller wrote: We have already gone over this. The days columns are effectively ORed. So the above job runs every day from the 1st to the 7th, and every Saturday of the month. Read man 5 crontab

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

2013-07-31 Thread Tony Molloy
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

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

2013-07-31 Thread m . roth
Tony Molloy wrote: 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

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

2013-07-31 Thread Bart Schaefer
On Wed, Jul 31, 2013 at 8:35 AM, m.r...@5-cent.us wrote: I agree with the original poster: why doesn't his work, which says 6 in the location for day of week, which is Sat.? I'd think it meet the criteria it's somewhere between the 1st and the 7th of the month, and it's a Sat, and that I

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

2013-07-31 Thread m . roth
Tony Molloy wrote: 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 snip Ok, I just mentioned this to my manager, and he told me why: he said he'd been bitten by this before, and what's happening

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

2013-07-31 Thread John R Pierce
On 7/31/2013 8:35 AM, m.r...@5-cent.us wrote: I agree with the original poster: why doesn't his work, which says 6 in the location for day of week, which is Sat.? I'd think it meet the criteria it's somewhere between the 1st and the 7th of the month, and it's a Sat, and that I think should be

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

2013-07-31 Thread Stephen Harris
On Wed, Jul 31, 2013 at 08:52:02AM -0700, Bart Schaefer wrote: As Keith said, it's because the conditions are OR'd. A careful reading of crontab(5) shows that the algorithm is [minute AND hour AND (restricted day of week OR restricted day of month) AND month]. Day of week and day of month

[CentOS] run script on cron job only run on first Saturdat every month???

2013-07-30 Thread mcclnx mcc
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? Thanks.

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

2013-07-30 Thread John R Pierce
On 7/30/2013 1:43 PM, mcclnx mcc wrote: 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? I don't

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

2013-07-30 Thread m . roth
John R Pierce wrote: On 7/30/2013 1:43 PM, mcclnx mcc wrote: 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

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

2013-07-30 Thread Keith Keller
On 2013-07-30, m.r...@5-cent.us m.r...@5-cent.us wrote: On 7/30/2013 1:43 PM, mcclnx mcc wrote: 15 04 1-7 * 6 /home/app/oracle/backup/monthlybk.sh It certainly doesn't. However, I'm surprised the o/p's crontab entry *doesn't* work: it should run only on Sat, and only on when it's somewhere

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

2013-07-30 Thread Joseph Spenner
From: mcclnx mcc mcc...@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

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

2013-07-30 Thread John R Pierce
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) -- john r pierce 37N 122W somewhere on the middle of the