0

我补充说DBMS_SCHEDULER.CREATE_JOB

SYS.DBMS_SCHEDULER.CREATE_JOB
(
   job_name        => 'CHECK'
  ,start_date      => TO_TIMESTAMP_TZ('2000/12/26 01:00:00.000000 +00:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
  ,repeat_interval => 'FREQ=DAILY;BYMINUTE=05'
  ,end_date        => NULL
  ,job_class       => 'DEFAULT_JOB_CLASS'
  ,job_type        => 'PLSQL_BLOCK'
  ,job_action      => 'begin check.Checkname() end;'
  ,enabled         => TRUE
  ,comments        => ''
);

DBA_SCHEDULER_JOBS我得到工作细节但它在SCHEDULED状态。

它没有运行。当我厌倦了手动运行这项工作时,它会抛出一些错误。

谁能帮我解决这个问题?

4

1 回答 1

1

但这是正确的!

使用您的start_daterepeat_interval设置,您每天运行一次作业01:05

JOB_NAME START_DATE                             REPEAT_INTERVAL        STATE     NEXT_RUN_DATE
-------- -------------------------------------- ---------------------- --------- -------------------------------------- 
LOGGER2  26-DEC-00 01.00.00.000000000 AM +00:00 FREQ=DAILY;BYMINUTE=05 SCHEDULED 19-SEP-13 01.05.00.600000000 AM +00:00

如果您想每 5 分钟运行一次作业,请使用:

start_date => systimestamp,
repeat_interval => 'FREQ=MINUTELY;INTERVAL=5'

JOB_NAME START_DATE                             REPEAT_INTERVAL          STATE     NEXT_RUN_DATE
-------- -------------------------------------- ------------------------ --------- -------------------------------------- 
LOGGER3  18-SEP-13 06.53.53.532906000 PM +00:00 FREQ=MINUTELY;INTERVAL=5 SCHEDULED 18-SEP-13 06.58.53.500000000 PM +00:00
于 2013-09-18T18:59:18.933 回答