Home » SQL & PL/SQL » SQL & PL/SQL » DBMS_SCHEDULER - job to be created (Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi)
DBMS_SCHEDULER - job to be created [message #396900] Wed, 08 April 2009 06:05 Go to next message
NewLife
Messages: 170
Registered: April 2008
Senior Member
Hi Guys,

I need to create a job with at the following interval:

It should run on the first sunday of every month at 00:30:00, i.e 30 minutes past midnight.

Please can some one help me.

Also since i am on Oracle 10g, Is it easier to use DBMS_SCHEDULER ?

Re: DBMS_SCHEDULER - job to be created [message #396902 is a reply to message #396900] Wed, 08 April 2009 06:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> with data as (select sysdate+31*(level-1) d from dual connect by level <= 10)
  2  select d, 
  3         trunc(next_day(last_day(d),'Sunday'))+1/48 next_d
  4  from data
  5  order by 1
  6  /
D                             NEXT_D
----------------------------- -----------------------------
Wednesday 08/04/2009 13:14:42 Sunday    03/05/2009 00:30:00
Saturday  09/05/2009 13:14:42 Sunday    07/06/2009 00:30:00
Tuesday   09/06/2009 13:14:42 Sunday    05/07/2009 00:30:00
Friday    10/07/2009 13:14:42 Sunday    02/08/2009 00:30:00
Monday    10/08/2009 13:14:42 Sunday    06/09/2009 00:30:00
Thursday  10/09/2009 13:14:42 Sunday    04/10/2009 00:30:00
Sunday    11/10/2009 13:14:42 Sunday    01/11/2009 00:30:00
Wednesday 11/11/2009 13:14:42 Sunday    06/12/2009 00:30:00
Saturday  12/12/2009 13:14:42 Sunday    03/01/2010 00:30:00
Tuesday   12/01/2010 13:14:42 Sunday    07/02/2010 00:30:00

Regards
Michel
Re: DBMS_SCHEDULER - job to be created [message #396908 is a reply to message #396902] Wed, 08 April 2009 06:24 Go to previous messageGo to next message
NewLife
Messages: 170
Registered: April 2008
Senior Member
Hmmmmm Hey thenks for the query...I am just looking at how can i incorporate it into the job ?
Re: DBMS_SCHEDULER - job to be created [message #396909 is a reply to message #396908] Wed, 08 April 2009 06:27 Go to previous messageGo to next message
bonker
Messages: 402
Registered: July 2005
Senior Member

Read this it may help you.

http://www.oracle-base.com/articles/10g/Scheduler10g.php
Re: DBMS_SCHEDULER - job to be created [message #396910 is a reply to message #396908] Wed, 08 April 2009 06:36 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to set NEXT_DATE parameter of SUBMIT function with the formula.

Regards
Michel
Re: DBMS_SCHEDULER - job to be created [message #396911 is a reply to message #396910] Wed, 08 April 2009 06:42 Go to previous message
NewLife
Messages: 170
Registered: April 2008
Senior Member
Hey Michel thanks Smile and bonker, you too, I am looking at the possibility of using dbms_scheduler Smile
Previous Topic: SQL Non Equi Join
Next Topic: Maximum Value Wihtout using Oracle Functions
Goto Forum:
  


Current Time: Mon Dec 05 15:08:17 CST 2016

Total time taken to generate the page: 0.05017 seconds