Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Scheduler not running the jobs

85286Dec 28 2007 — edited Jan 16 2008
Hi,

From a PL/SQL procedure I am creating a dbms job as follows:

Trial 1:

BEGIN
DBMS_SCHEDULER.create_job(job_name => 'EMAIL',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN SEND_MAIL; END;',
enabled => TRUE);
END;

As expected this is creating the named job and running it immediately. Scheduler is running this job immediately till yesterday.

For some reason the job is not getting kicked off immediately since today morning. I have no idea where the fault is. So, I tried the below:

Trial 2:

BEGIN
DBMS_SCHEDULER.create_job(job_name => 'EMAIL',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN SEND_MAIL; END;');

DBMS_SCHEDULER.run_job(job_name => 'EMAIL');
END;

This is running the job immediately. Then I tried the below & it is not running the job immediately.

Trial 3:

BEGIN
DBMS_SCHEDULER.create_job(job_name => 'EMAIL',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN SEND_MAIL; END;');

-- explicitly specify use new session
DBMS_SCHEDULER.run_job('EMAIL', FALSE);
END;

I want to understand why Trial 1 did not run immediately. Seems like Oracle scheduler is not schedulign the jobs as expected. Can any one think of potential reasons for this.

Thanks in advance.
S.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2008
Added on Dec 28 2007
7 comments
5,748 views