Reputation: 3
I added 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 => ''
);
In DBA_SCHEDULER_JOBS
I am getting the job details but Its in SCHEDULED
State.
Its not running. When I tired to run the job manually its throwing some error.
Can anyone help me to resolve this?
Upvotes: 0
Views: 7926
Reputation: 10648
But that's correct !
With your start_date
and repeat_interval
settings you run the job once every day at 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
if you want to run the job every 5 minutes use:
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
Upvotes: 1