I am trying to create a scheduler job in Oracle. The job gets created and appears in the list of jobs, but it fails to run at the scheduled time, instead giving an error. For example, right now it gives the error ’04-JUL-24′ is not an appropriate date. How can I fix this issue?
CREATE OR REPLACE PROCEDURE RPPR_DAILY_REP_CALL AS
BEGIN
DBMS_SCHEDULER.CREATE_JOB(JOB_NAME => 'DAILY_BATCH',
JOB_TYPE => 'PLSQL_BLOCK',
JOB_ACTION => 'BEGIN RPPR_DAILY_REP_BATCH;END;',
START_DATE => SYSTIMESTAMP,
REPEAT_INTERVAL => 'FREQ=DAILY; BYHOUR=8; BYMINUTE=0; BYSECOND=0',
ENABLED => TRUE,
AUTO_DROP => FALSE,
COMMENTS => 'JOB TO RUN PROCEDURE AT 8AM');
DBMS_SCHEDULER.RUN_JOB(JOB_NAME => 'DAILY_BATCH');
END;
New contributor
Khurram Raza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.