Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit job at 3 specified times each day?

Status
Not open for further replies.

GPOTony

Programmer
Oct 2, 2002
60
IE
Hi,
I have a job that runs every hour, see code below.

How do I get to run at 08:00, 12:00 and 16:00 only?
Do I have to create 3 jobs to run at 8/12, 12/24 and 16/24, or is it possible to do it all 3 in 1 job?
Thanks in advance.

DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'my_check_scheduled_jobs.check_jobs;'
,next_date => to_date('26/08/2010 17:00:00','dd/mm/yyyy hh24:mi:ss')
,interval => '/*EVERY HR ON THE HR*/ TRUNC (SYSDATE ,''HH'') +1/(24)'
,no_parse => FALSE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/

 
I would submit the same job three times; set a specific time for each one with an interval of 24 hours.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top