Re: how to schedule a job every alternate sundays in unix cron
Brilliant. :) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/16/2003 11:29 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: Subject:Re: how to schedule a job every alternate sundays in unix cron 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 [EMAIL PROTECTED] [EMAIL PROTECTED]cc: om Subject: how to schedule a job every alternate sundays in unix cron Sent by: [EMAIL PROTECTED] .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 __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
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. :) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/16/2003 11:29 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: Subject:Re: how to schedule a job every alternate sundays in unix cron 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 [EMAIL PROTECTED] [EMAIL PROTECTED]cc: om Subject: how to schedule a job every alternate sundays in unix cron Sent by: [EMAIL PROTECTED] .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 __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: how to schedule a job every alternate sundays in unix cron
lol, actually makes sense :). wondering how the perl version would look like?Gene [EMAIL PROTECTED] 07/17/03 02:49PM what a freekin nightmare! I'd hate to be the next poor bloke who has todecifer this...Tom MercadanteOracle Certified Professional-Original Message-Sent: Thursday, July 17, 2003 2:35 PMTo: Multiple recipients of list ORACLE-LBrilliant. :)[EMAIL PROTECTED]Sent by: [EMAIL PROTECTED]07/16/2003 11:29 PMPlease respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: Subject: Re: how to schedule a job every alternate sundays inunix cron0 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 [EMAIL PROTECTED] [EMAIL PROTECTED] cc: om Subject: how to schedule a job every alternate sundays in unix cron Sent by: [EMAIL PROTECTED] .com 07/16/2003 06:09 AM Please respond to ORACLE-L Hello All,OS: Solaris 2.8I have to run a backup script in every alternateSunday.I cant find a way to submit it in cron.Can somebody help me how to setup a job to runalternate Sundays in unix cron .Thanks and Regards,Srinivas__Do you Yahoo!?SBC Yahoo! DSL - Now only $29.95 per month!http://sbc.yahoo.com--Please see the official ORACLE-L FAQ: http://www.orafaq.net--Author: kommareddy sreenivasa INET: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services-To REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).-- Please see the official ORACLE-L FAQ: http://www.orafaq.net-- Author: INET: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services-To REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).-- Please see the official ORACLE-L FAQ: http://www.orafaq.net-- Author: INET: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services-To REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso 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: [EMAIL PROTECTED]Fat City Network Services -- 858-538-5051 http://www.fatcity.comSan Diego, California -- Mailing list and web hosting services-To REMOVE yourself from this mailing list, send an E-Mail messageto: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing).
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 [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/17/2003 11:49 AM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] 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. :) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/16/2003 11:29 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: Subject:Re: how to schedule a job every alternate sundays in unix cron 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 [EMAIL PROTECTED] [EMAIL PROTECTED]cc: om Subject: how to schedule a job every alternate sundays in unix cron Sent by: [EMAIL PROTECTED] .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 __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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
RE: how to schedule a job every alternate sundays in unix cron
cough Ah, no...no downfall on 28/30/31 day month thingy. Do a man page on date, in the see also section it say to look at strftime, doing a man page on strftime you will see that the %U format is defined as: %UWeek number of year as a decimal number [00,53], with Sunday as the first day of week 1. So this will run it on Sundays for the even weeks of the year. Not perfect because of the 53 week year cycle, but hey, the advice was free. [EMAIL PROTECTED] ys.com To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent by: cc: [EMAIL PROTECTED]Subject: RE: how to schedule a job every alternate sundays in unix cron .com 07/17/2003 03:09 PM Please respond to ORACLE-L 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 [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/17/2003 11:49 AM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] 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. :) [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 07/16/2003 11:29 PM Please respond to ORACLE-L To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] cc: Subject:Re: how to schedule a job every alternate sundays in unix cron 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 [EMAIL PROTECTED] [EMAIL PROTECTED]cc: om Subject: how to schedule a job every alternate sundays in unix cron Sent by: [EMAIL PROTECTED] .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 __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: [EMAIL PROTECTED] Fat City Network Services-- 858-538-5051 http://www.fatcity.com San Diego, California-- Mailing list and web hosting services
Re: how to schedule a job every alternate sundays in unix cron
I'm not a Unix expert, but one thing you could do is schedule the script to run every Sunday, then within the script add some logic so that the script completes every other Sunday. For example, in ksh: # Check to see if this script ran last Sunday. if [[ -a ran_last_week.dat ]]; then rm ran_last_week.dat exit else # Create a file to signal that the script ran. touch ran_last_week.dat rest of script Jay [EMAIL PROTECTED] 07/16/03 09:09AM 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 __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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). **DISCLAIMER This e-mail message and any files transmitted with it are intended for the use of the individual or entity to which they are addressed and may contain information that is privileged, proprietary and confidential. If you are not the intended recipient, you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received this communication in error, please notify the sender and delete this e-mail message. The contents do not represent the opinion of DE except to the extent that it relates to their official business. -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jay Hostetter INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
Re: how to schedule a job every alternate sundays in unix cron
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 [EMAIL PROTECTED] [EMAIL PROTECTED]cc: om Subject: how to schedule a job every alternate sundays in unix cron Sent by: [EMAIL PROTECTED] .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 __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: kommareddy sreenivasa INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).