Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: how to schedule a job every alternate sundays in unix cron
> what a freekin nightmare!
Not really.
Is today Sunday? :
`date '+\%a'` = 'Sun'
if it is, check this also ('and'):
-a
Is this an odd or even day?
eg. daynum mod 2
((`date '+\%U'` % 2)) -eq 0
One possible downfall of this is if the current Sunday is the 30th, and the next day is Monday the 31st.
Then the following Sunday is the 6th, and then two Sundays in a row will run.
Jared
"Mercadante, Thomas F" <NDATFM_at_labor.state.ny.us>
Sent by: ml-errors_at_fatcity.com
07/17/2003 11:49 AM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: Subject: RE: how to schedule a job every alternate sundays in unix cron
what a freekin nightmare! I'd hate to be the next poor bloke who has to decifer this...
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
Sent: Thursday, July 17, 2003 2:35 PM
To: Multiple recipients of list ORACLE-L
Brilliant. :)
Brian_P_MacLean_at_eFunds.Com
Sent by: ml-errors_at_fatcity.com
07/16/2003 11:29 PM
Please respond to ORACLE-L
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
cc: Subject: Re: how to schedule a job every alternate sundaysin
0 1 * * 0 /usr/bin/ksh -c "[ `date '+\%a'` = 'Sun' -a $((`date '+\%U'` \% 2)) -eq 0 ] && /path/myscript.ksh"
This will run myscript.ksh on even Sundays at 1 a.m.
If ?'s, email me direct.
kommareddy sreenivasa To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> <kommacnu_at_yahoo.c cc: om> Subject: how to schedule a job every alternate sundays in unix cron Sent by: ml-errors_at_fatcity .com 07/16/2003 06:09 AM Please respond to ORACLE-L
Hello All,
OS: Solaris 2.8
I have to run a backup script in every alternate Sunday.
I cant find a way to submit it in cron.
Can somebody help me how to setup a job to run alternate Sundays in unix cron .
Thanks and Regards,
Srinivas
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: kommacnu_at_yahoo.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Brian_P_MacLean_at_eFunds.Com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Jared.Still_at_radisys.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mercadante, Thomas F INET: NDATFM_at_labor.state.ny.us Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Thu Jul 17 2003 - 16:11:01 CDT
![]() |
![]() |