Here is a simple job.
SQL> create table log1 (ts timestamp) 2 / Table created. SQL> create or replace procedure printe as 2 begin 3 insert into log1 values (systimestamp); 4 commit; 5 end; 6 / Procedure created. SQL>
So, the first thing you need is to send it with a given start time and interval. If you cannot remember how many minutes a day (1440), it is recommended that you use parentheses. Let me compare job submission with your date specifications ...
SQL> var job_no number SQL> BEGIN 2 DBMS_JOB.SUBMIT 3 ( 4 job =>:job_no, 5 WHAT=>'printe;',--Procedure 6 next_date=>sysdate+1/24*60, 7 interval=>'sysdate+1/24*60' 8 ); 9 commit; 10 END; 11 / PL/SQL procedure successfully completed. SQL> print job_no JOB_NO ---------- 71 SQL>
... using parentheses to confirm priority ...
SQL> BEGIN 2 DBMS_JOB.SUBMIT 3 ( 4 job =>:job_no, 5 WHAT=>'printe;',--Procedure 6 next_date=>sysdate+1/(24*60), 7 interval=>'sysdate+1/(24*60)' 8 ); 9 commit; 10 END; 11 / PL/SQL procedure successfully completed. SQL> print job_no JOB_NO ---------- 72 SQL>
Obviously, job 71 has not started and has not yet started for some time:
SQL> select job, what, last_date, next_date, interval 2 from user_jobs 3 where job in (71,72) 4 / JOB WHAT LAST_DATE NEXT_DATE INTERVAL ------ ------------ -------------------- -------------------- ----------------- 71 printe; 05-MAY-2010 17:35:34 sysdate+1/24*60 72 printe; 03-MAY-2010 05:44:42 03-MAY-2010 05:45:34 sysdate+1/(24*60) SQL>
Monitoring task 72 ....
SQL> select * from log1 2 / TS ------------------------------------------------------------------- 03-MAY-10 05:43:39.250000 03-MAY-10 05:44:42.296000 SQL>
So, if this still does not work for you, what should you do? First of all, you need to check whether the database is configured to perform tasks in general. To do this, you will need access to the DBA.
SQL> select value 2 from v$parameter 3 where name='job_queue_processes' 4 / VALUE ------------------------- 1000 SQL>
If I remember correctly, in Oracle 9i, the default value for this parameter is 0. It needs to be set for some non-zero value for the tasks being performed.
And if this is not a problem, you need to check the error messages in the warning log. The background_dump_dest directory may also contain some .trc files created by a failed job.