Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how to schedule a job on second saturday using cron ?

Re: how to schedule a job on second saturday using cron ?

From: Charlotte Hammond <charlottejanehammond_at_yahoo.com>
Date: Tue, 31 May 2005 02:44:23 -0700 (PDT)
Message-ID: <20050531094424.44086.qmail@web33112.mail.mud.yahoo.com>

Oops - sorry! Aside from being entirely wrong, it was a great suggestion. :-(

Apologies for the mis-direction.

Hmm, that's odd, it should not work. From the crontab documentation
(man page):

"Note: The day of a command's execution can be specified by two fields
-- day of month, and day of week. If both fields are restricted (ie,
aren't *), the command will be run when _either_ field matches the
current time. For example,
``30 4 1,15 * 5'' would cause a command to be run at 4:30 am on the 1st
and 15th of each month, plus every Friday."

So the example below would run every Saturday plus 8th-14th of the
month, not what you want.

A quick search of Google gives you something better, like this:

0 1 8-14 * * [ "$(date +\%a)" == "Sat" ] && script_with_no_date_logic

Prem Khanna J wrote:

> Hi Charlotte/Gillies,
>
> Thanks for your help. it works : )
>

[...]
> On 5/23/05, Charlotte Hammond

<charlottejanehammond_at_yahoo.com> wrote:
>

>>Hi Prem,
>>Something like this (1am on 2nd Saturday):
>>00 01 8,9,10,11,12,13,14 * 6 /app/my_saturday_job.sh
>>HTH,
>>Charlotte

[...]
-- 
Mark Bole
http://www.bincomputing.com



--
http://www.freelists.org/webpage/oracle-l



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 31 2005 - 05:49:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US