Here, i'm confused, NEXT_DATE,NEXT_SEC is showing as the date and time at which i created the job. Can you please tell me how to check it up when my job is going to fire again ?? as per we set in the code???
Jurij/Julian ,
Here again i'm pasting some more results after i set the job as you mentioned. Here i'm confused like, next_date is showing as 09-JUL-02, which is today. But interval is showing as correct . Can you please clarify??
SQL> select INTERVAL from user_jobs where job=172;
Your job 172 has not been run jet, it is still waiting to be run for the first time. You can see this by looking at LAST_DATE column, it is NULL. So the actual NEXT_DAT this job needs to be run is actually allready in the past, ie the moment you submited it. And why it has not been run yet? Because you didn't COMMIT your job submition. Until you enter COMMIT, you can see this job in DBA_JOBS only from the session that submitted it, while the RDBMS system does not see it yet, so it can't run it.
As soon as you commit your submition, the job will run and the NEXT_DATE will be update correctly to next SUNDAY.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Your job is running just now! THIS_DATE and THIS_SEC columns are not null only during the execution of the job. And during that time, NEXT_DATE and NEXT_SEC are set to the same values as THIS_DATE and THIS_SEC.
As soon as the job completes, the values in THIS_DATE/THIS_SEC will disappear and the NEXT_DATE/NEXT_SEC will be set to the next sunday.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
See there are two parameter in the job and you are passing sysdate and the 'NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')+3/24');
so in case of first parameter which is sysdate it will fire as soon as you run that job and the second parameter is the due date parameter so do one thing put this string(NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')+3/24) in both the parameter
begin
DBMS_JOB.SUBMIT(:jobno, 'CALL_WEEKLY;',
NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')+3/24,
'NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')+3/24');
end;
Jurij,
now my job is not running it seems, atleast now, it has to show me the next sunday's date. but here it's not. And i gone throught the complete procedure there is no exceptions which are unhandled. What might be the problem??
Bookmarks