2 Replies Latest reply: Oct 15, 2012 2:28 PM by mwadmin RSS

    Scheduled Job Does Not Run

    946538
      I created a simple job using dbms_scheduler.create_job. It does not run as scheduled. Why? And which data dictionary table to find relevant info?
      Appreciate any help here.


      This is creating job code:
      Begin
      Dbms_scheduler.create_job ( job_name => 'Data_Hourly_Load',
      Job_type => 'STORED_PROCEDURE',
      Job_action => 'load_data.load_hourly',
                               number_of_arguments => 2,
      Start_date => '09-OCT-08 11.00.00 PM -04:00',
      Repeat_interval => 'FREQ=HOURLY; BYMINUTE=10',
      End_date => NULL,
                               enabled => FALSE,
      Comments => 'Loading data');

      DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (job_name => 'Data_Hourly_Load',
      argument_position => 1,
      argument_value => 1/24);

      DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (job_name => 'Data_Hourly_Load',
      argument_position => 2,
      argument_value =>'Dev');
      DBMS_SCHEDULER.ENABLE('Data_Hourly_Load');
      DBMS_SCHEDULER.RUN_JOB('Data_Hourly_Load');
      END;
      /

      And this is what I checked today:
      select job_name,job_action,enabled, state, last_start_date, last_run_duration, next_run_date
      from user_scheduler_jobs 2
      3 /

      JOB_NAME
      ------------------------------------------------------------------------------------------
      JOB_ACTION
      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      ENABLED STATE LAST_START_DATE
      --------------- --------------------------------------------- ---------------------------------------------------------------------------
      LAST_RUN_DURATION NEXT_RUN_DATE
      --------------------------------------------------------------------------- ---------------------------------------------------------------------------
      DATA_HOURLY_LOAD
      load_data.load_hourly
      TRUE SCHEDULED
      09-OCT-12 01.10.00.000000 PM -04:00