Home » SQL & PL/SQL » SQL & PL/SQL » Job schedule (merged)
Job schedule (merged) [message #385855] Wed, 11 February 2009 08:05 Go to next message
convey05
Messages: 43
Registered: December 2007
Location: CHENNAI
Member
Hi,
I have to run a job schedule.The server is in US.
My schedule has to be executed in US timings only.
Condition is the job not to be executed between 10am pst and 8pm pst.
So I gave my schedule like this

exec dbms_scheduler.create_job(
job_name=>'test',
job_type=>'PLSQL_BLOCK',
job_action=>'test;',
start_date=> to_date('24/01/2009 01:00:00','dd/mm/yyyy hh24:mi:ss'),
repeat_interval=>'FREQ=HOURLY;BYHOUR=0,1,2,3,4,5,6,7,8,9,10,20,21,22,23;BYMINUTE=00;BYSECOND=00;BYDAY=MON,TUE,WED,THU,FRI',
comments=>' test ');


Exec dbms_scheduler.enable(name=>' test ');

When i executed this it is showing the next run date as 8 pm instead 2AM.
Kindly help me

Thanks in advance
Re: Job schedule [message #385859 is a reply to message #385855] Wed, 11 February 2009 08:39 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From one of your previous topics:
Michel Cadot wrote on Mon, 07 July 2008 16:11
From one of your previous topics:
Michel Cadot wrote on Mon, 30 June 2008 12:17
1/
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.

2/
Always post your Oracle version (4 decimals).

...

Regards
Michel



Re: Job schedule (merged) [message #385863 is a reply to message #385855] Wed, 11 February 2009 10:02 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Your Start_Date is in the past
When the Schedule is created, the next_run_date is set as the first time after the latest of (start_date and current time) that the job can run.
If you create this schedule between 10:00 Am and 8:00 Pm, on a day after 24th Jan, it will be scheduled to start at 8:00 Pm on the day you create it.

No formatting required for this answer.
Re: Job schedule (merged) [message #385867 is a reply to message #385863] Wed, 11 February 2009 10:48 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Required no, recommended yes and it shows that the poster has now the will to follow the guidelines unlike his previous postS.
As well as for the version number, he can't know if it is useful or not to post it correctly.

Regards
Michel
Previous Topic: Wrap Tool - Subquery Issue
Next Topic: Merge Statement with PL/SQL Collection type
Goto Forum:
  


Current Time: Sat Dec 03 20:22:56 CST 2016

Total time taken to generate the page: 0.04419 seconds