This discussion is archived
10 Replies Latest reply: Mar 28, 2013 4:29 AM by Reena RSS

dbms scheduler

460360 Newbie
Currently Being Moderated
How can I setup a scheduler job to run every year from june 15th to aug 31?



11gR2
  • 1. Re: dbms scheduler
    AdamMartin Pro
    Currently Being Moderated
    user457357 wrote:
    How can I setup a scheduler job to run every year from june 15th to aug 31?
    So you want a job to run once a year, and you want it to run for 2 and a half months?

    I doubt it. What do you really want? Please clarify.
  • 2. Re: dbms scheduler
    460360 Newbie
    Currently Being Moderated
    No not just once but to continually run during june 15 to aug 13
    Example to have it run
    2013 from june 15th through aug 30th
    2014 from june 15th through aug 30th
    2015 from june 15th through aug 30th
    2016 from june 15th through aug 30th
    2017 from june 15th through aug 30th
    2018 from june 15th through aug 30th
    2019 from june 15th through aug 30th
    etc
  • 3. Re: dbms scheduler
    AdamMartin Pro
    Currently Being Moderated
    You just repeated the same thing. Why would you want a job to run continuously for so long? What takes 2 and a half months of processing? And how will you know when it is done? Or do you mean to stop it on August 30th whether it is done or not?

    I still think you aren't telling us what you really want it to do.

    Do you really mean that you want it to run daily from June 15th to August 30th? Or maybe you really mean that you want it to run every hour from June 15th to August 30th. Or every 5 minutes?

    Instead of me guessing, why don't you be a little more specific.
  • 4. Re: dbms scheduler
    460360 Newbie
    Currently Being Moderated
    sorry meant to add the daily part to it.
  • 5. Re: dbms scheduler
    460360 Newbie
    Currently Being Moderated
    basically I want to do
    freq=yearly; bymonth=june,july,aug; byday=mon,tue,wed,thu,fri;
    but have this start every year on june 15th and end on aug31
  • 6. Re: dbms scheduler
    AdamMartin Pro
    Currently Being Moderated
    I would just run it daily. Then in the package, the first thing it would do is ask, "Is the current date between June 15th and August 31st?" If so, then continue with processing. If not, then end.
  • 7. Re: dbms scheduler
    460360 Newbie
    Currently Being Moderated
    I know there are work around's but am wondering how to do it in the scheduler. I know I can create another basically empty scheduler that runs daily from june 1st to the 14th and then use the exclude functionality when setting up my job but would like to be able to do this with one job.
  • 8. Re: dbms scheduler
    AdamMartin Pro
    Currently Being Moderated
    Use a repeat_interval like this:

    FREQ=YEARLY; BYDATE=0615+SPAN:78D

    and if you just wanted weekdays during that period, you could also add to it:

    BYDAY=MON,TUE,WED,THU,FRI
  • 9. Re: dbms scheduler
    460360 Newbie
    Currently Being Moderated
    Thank you will give that a try.
  • 10. Re: dbms scheduler
    Reena Newbie
    Currently Being Moderated
    Hi Adam,

    Thanks, explained well

    Regards,

    Edited by: Reena on Mar 28, 2013 4:58 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points