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 every alternate sundays in unix cron

RE: how to schedule a job every alternate sundays in unix cron

From: Stephen Lee <Stephen.Lee_at_DTAG.Com>
Date: Wed, 16 Jul 2003 10:16:12 -0500
Message-Id: <25937.338054@fatcity.com>


You can schedule ksh front end script every Sunday that does something like:

WEEK=`/usr/bin/date +%U`

while [ $WEEK -gt 0 ]; do

   WEEK=$(( $WEEK - 2 ))
done

if [ $WEEK -eq 0 ]; then

   echo "EVEN"
else

   echo "ODD"
fi
--------- snip ---------------

In place of echo "EVEN" or echo "ODD", you can have the ksh front end run your job. If you have a perl front end, I suppose you could use modulo arithmetic directly.

> -----Original Message-----
> From: kommareddy sreenivasa [mailto:kommacnu_at_yahoo.com]
> Sent: Wednesday, July 16, 2003 8:09 AM
> To: Multiple recipients of list ORACLE-L
> Subject: how to schedule a job every alternate sundays in unix cron
>
>
> 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: 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).
Received on Wed Jul 16 2003 - 10:16:12 CDT

Original text of this message

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