← Scheduler & Jobs
Oracle · Scheduler & Jobs

How to change a scheduler job schedule in Oracle

Change a scheduler job calendar schedule with DBMS_SCHEDULER.SET_ATTRIBUTE and verify the new next run time.

Tested on11g12c18c19c21c23ai26ai

Change a Scheduler job calendar schedule, then confirm the new next run time.

This changes when the job runs. Adjust the repeat_interval calendar string to your needs before running.

BEGIN
  DBMS_SCHEDULER.SET_ATTRIBUTE(
    name      => '&&job_name',
    attribute => 'repeat_interval',
    value     => 'FREQ=DAILY; BYHOUR=3; BYMINUTE=30; BYSECOND=0');
END;
/

-- Verify (read-only)
SELECT job_name, repeat_interval,
       TO_CHAR(next_run_date,'YYYY-MM-DD HH24:MI') AS next_run
FROM   dba_scheduler_jobs
WHERE  job_name = UPPER('&job_name');
DBMS_SCHEDULERSET_ATTRIBUTEScheduler