Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to schedule a job on second saturday using cron ?
I thought I had a saved mail to answer a similar sort of question but I
cannot find it.
Looking around I see the following suggestion on Google
"A frustrating little problem. Set up cron so that it runs a script on the required day of every week, rather than on that day every second week. Inside the script put an 'if' statement. Calculate the current day as a number of days since any fixed time in the past, perhaps using date(1) for a bash/ksh/sh script. If the number of days is even, run your fortnightly job. If the number of days is odd, finish without running anything"
Given the above you could probably just type the list of dates in to a file (only 26/year) and search that file to compare with today's date and if true then run a job else exit.
John
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Prem Khanna J
Sent: 23 May 2005 14:21
To: oracle-l_at_freelists.org
Subject: how to schedule a job on second saturday using cron ?
Hi All,
How do i schedule a job on second saturday of every month using cron ? Can someone help ? TIA.
Regards,
Prem.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 23 2005 - 10:37:20 CDT
![]() |
![]() |