我正在尝试在 Oracle 中创建调度程序作业。该作业已创建并显示在作业列表中,但无法在计划时间运行,而是给出错误。例如,现在它给出错误“04-JUL-24”不是合适的日期。我该如何解决这个问题?
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;
遇到的错误:
ORA-23319: parameter value "04-JUL-24" is not appropriate
ORA-06512: at "SYS.DBMS_JOB", line 84
ORA-06512: at "SYS.DBMS_JOB", line 163
ORA-06512: at "REGREP.RPPR_DAILY_REP_BATCH", line 8
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_ISCHED", line 209
ORA-06512: at "SYS.DBMS_SCHEDULER", line 594
ORA-06512: at "REGREP.RPPR_DAILY_REP_CALL", line 12
ORA-06512: at line 3
当我跑步时
BEGIN
DBMS_SCHEDULER.DROP_JOB('DAILY_BATCH');--ONLY WHEN JOB ALREADY EXISTS
RPPR_DAILY_REP_CALL;
END;