Home » SQL & PL/SQL » SQL & PL/SQL » DBMS_SCHEDULER
DBMS_SCHEDULER [message #324655] Tue, 03 June 2008 09:50 Go to next message
Duane
Messages: 452
Registered: December 2002
Senior Member
I can't seem to find what I'm looking for in the documentation so maybe one of you know how to do this.

How do you schedule a job in the DBMS_SCHEDULER to run only once when it's called? I'm not sure what goes in the "repeat_interval" since I only want it to run when I execute the package doing the DBMS_SCHEDULER statement.

This is how I did it in dbms_job:

dbms_job.submit (jobNumber, 'email_ealumni_changes.email;');

dbms_scheduler.create_job(
   job_name          =>  'eAlumniEmail',
   job_type          =>  'PLSQL_BLOCK',
   job_action        =>  'email_ealumni_changes.email',
   start_date        =>  sysdate,
   repeat_interval   =>  'FREQ = DAILY;?????');


I don't want to run the job daily, I just want to run the job once when the DBMS_SCHEDULER is called.

[Updated on: Tue, 03 June 2008 09:52]

Report message to a moderator

Re: DBMS_SCHEDULER [message #324657 is a reply to message #324655] Tue, 03 June 2008 10:04 Go to previous messageGo to next message
BlackSwan
Messages: 25043
Registered: January 2009
Location: SoCal
Senior Member
PROCEDURE CREATE_JOB
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 JOB_NAME                       VARCHAR2                IN
 PROGRAM_NAME                   VARCHAR2                IN
 START_DATE                     TIMESTAMP WITH TIME ZONE IN     DEFAULT
 REPEAT_INTERVAL                VARCHAR2                IN     DEFAULT
 END_DATE                       TIMESTAMP WITH TIME ZONE IN     DEFAULT
 JOB_CLASS                      VARCHAR2                IN     DEFAULT
 ENABLED                        BOOLEAN                 IN     DEFAULT
 AUTO_DROP                      BOOLEAN                 IN     DEFAULT
 COMMENTS                       VARCHAR2                IN     DEFAULT

REPEAT_INTERVAL is NOT a required parameter; so do not include it
Re: DBMS_SCHEDULER [message #324664 is a reply to message #324655] Tue, 03 June 2008 10:18 Go to previous message
Duane
Messages: 452
Registered: December 2002
Senior Member
Thanks.

Well good grief! I went back and read the documentation again and the repeat_interval is only required when using the calendaring syntax. That's where i picked that up from.
Previous Topic: Select Statement inside a Trigger
Next Topic: Optimizing this query
Goto Forum:
  


Current Time: Wed Dec 07 08:26:43 CST 2016

Total time taken to generate the page: 0.07175 seconds