?
Solved

Specifying when a failed job is to retry running

Posted on 2008-11-12
4
Medium Priority
?
3,374 Views
Last Modified: 2013-12-19
Using Oracle's DBMS_SCHEDULER is there any way to specify when a failed job is to retry running again?  Our scheduled jobs are of the variety that if they fail, we would like to wait an hour before retrying running them again.  The Oracle online documentation on this seems to indicate that a scheduled job fail will be instantly retried to run again (up to max num retries).

              DBMS_SCHEDULER.CREATE_JOB (
                job_name            => strJobName
               ,job_type              => strJobType
               ,job_action          => strJobAction
               ,number_of_arguments => 1
               ,start_date          => dteStart
               ,end_date            => dteEnd
               ,repeat_interval     => 'FREQ=HOURLY;INTERVAL=1'
               ,enabled             => FALSE
               ,auto_drop           => FALSE
               ,comments            => strComments
              );
             
              DBMS_SCHEDULER.set_attribute (
                name        => strJobName
               ,attribute   => 'max_failures'
               ,value       =>  numMaxRetryAttempts
              );
0
Comment
Question by:crayola3
  • 2
4 Comments
 
LVL 23

Expert Comment

by:David
ID: 22942545
I have to concur that the restart cannot be deferred -- except in the following condition:

If restartable is set to FALSE for the job:
If the job is a run-once job and auto_drop is set to TRUE, the job run is done and the job is dropped.
If the job is a run-once job and auto_drop is set to FALSE, the job is disabled and the job state is set to 'STOPPED'.
If the job is a repeating job, the Scheduler schedules the next job run and the job state is set to 'SCHEDULED'.
 
0
 
LVL 23

Assisted Solution

by:David
David earned 1000 total points
ID: 22942549
0
 

Accepted Solution

by:
crayola3 earned 0 total points
ID: 22943717
Confirms what I had thought about how retry works for dbms_scheduler.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 22967643
in simple terms, there is no answer as of now for your requirement with 10g dbms_scheduler. I mean dbms_scheduler does not have an option for your requirement as far as i am aware. I wish to some option/solution to your requirement in oracle 11g version.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question