Job not running on defined schedule [message #561566] |
Tue, 24 July 2012 01:08 |
|
zeeshan007
Messages: 20 Registered: July 2012 Location: Pakistan
|
Junior Member |
|
|
Dear All,
I migrate schema with data from oracle 10gR2(Windows) to oracle RAC 11gR2 (Linux).
My JOBS are created but they are not running on defined schedule.
but they run manually successful.
----script of my job are as below --------
BEGIN
SYS.DBMS_SCHEDULER.DROP_JOB
(job_name => 'JHON.TAX_IT);
END;
/
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
(
job_name => 'JHON.TAX_IT
,start_date => TO_TIMESTAMP_TZ('2012/07/24 10:45:04.375000 Asia/Karachi','yyyy/mm/dd hh24:mi:ss.ff tzr')
,repeat_interval => 'FREQ=DAILY;BYHOUR=1;BYMINUTE=0;BYSECOND=0'
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'PLSQL_BLOCK'
,job_action => 'BEGIN
JHON.proc_miswkpi_it_taxpayers;
END;'
,comments => NULL
);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'JHON.TAX_IT
,attribute => 'RESTARTABLE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'JHON.TAX_IT
,attribute => 'LOGGING_LEVEL'
,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'JHON.TAX_IT
,attribute => 'MAX_FAILURES');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'JHON.TAX_IT
,attribute => 'MAX_RUNS');
BEGIN
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'JHON.TAX_IT
,attribute => 'STOP_ON_WINDOW_CLOSE'
,value => FALSE);
EXCEPTION
-- could fail if program is of type EXECUTABLE...
WHEN OTHERS THEN
NULL;
END;
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'JHON.TAX_IT
,attribute => 'JOB_PRIORITY'
,value => 3);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'JHON.TAX_IT
,attribute => 'SCHEDULE_LIMIT');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'JHON.TAX_IT
,attribute => 'AUTO_DROP'
,value => FALSE);
SYS.DBMS_SCHEDULER.ENABLE
(name => 'JHON.TAX_IT);
END;
/
regards,
Zeeshan Mehboob
[EDITED by LF: applied [code] tags]
[Updated on: Tue, 24 July 2012 01:27] by Moderator Report message to a moderator
|
|
|
|
Re: Job not running on defined schedule [message #561576 is a reply to message #561567] |
Tue, 24 July 2012 01:37 |
|
zeeshan007
Messages: 20 Registered: July 2012 Location: Pakistan
|
Junior Member |
|
|
Systme specs from where i want to run the job
ORACLE RAC 11gR2
Version 11.2.0.1.0
Linux 64 bit machine
------------------------
repeat schedule means that job run on repeat_interval => 'FREQ=DAILY;BYHOUR=1;BYMINUTE=0;BYSECOND=0
BEGIN
SYS.DBMS_SCHEDULER.DROP_JOB
(job_name => 'JHON.TAC_IT);
END;
/
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
(
job_name => 'JHON.TAC_IT
,start_date => TO_TIMESTAMP_TZ('2012/07/24 10:45:04.375000 Asia/Karachi','yyyy/mm/dd hh24:mi:ss.ff tzr')
,repeat_interval => 'FREQ=DAILY;BYHOUR=1;BYMINUTE=0;BYSECOND=0'
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'PLSQL_BLOCK'
,job_action => 'BEGIN
JHON.proc_miswkpi_it_taxpayers;
END;'
,comments => NULL
);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE( name => 'JHON.TAC_IT,attribute => 'RESTARTABLE',value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE( name => 'JHON.TAC_IT,attribute => 'LOGGING_LEVEL',value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
BEGIN
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE( name => 'JHON.TAC_IT,attribute => 'STOP_ON_WINDOW_CLOSE',value=> FALSE);
EXCEPTION
-- could fail if program is of type EXECUTABLE...
WHEN OTHERS THEN
NULL;
END;
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE (name => 'JHON.TAC_IT,attribute => 'JOB_PRIORITY',value => 3);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL (name => 'JHON.TAC_IT,attribute => 'SCHEDULE_LIMIT');
SYS.DBMS_SCHEDULER.ENABLE (name => 'JHON.TAC_IT);
END;
/
|
|
|
|
|
Re: Job not running on defined schedule [message #561586 is a reply to message #561576] |
Tue, 24 July 2012 02:05 |
|
Michel Cadot
Messages: 68732 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
In addition, if I post the question it is for you to reply with WORDS and not with scheduler formula as I don't know if both match and John's answer proves it does not work as you think it will work and so your formula are wrong.
So give the specification with WORDS.
Regards
Michel
[Updated on: Tue, 24 July 2012 02:06] Report message to a moderator
|
|
|
|