declare varjobid int; v_job_number number(10); TYPE cur_type IS REF CURSOR; objectcursor cur_type; Begin open objectcursor for select job from user_jobs where what = 'begin cleanup_events_tasks_proc; end;'; Loop fetch objectcursor into varjobid; exit when objectcursor%NOTFOUND; dbms_job.remove (job => varjobid); End Loop; Close objectcursor; begin dbms_job.submit( job => v_job_number, what=> 'begin cleanup_events_tasks_proc; end;', next_date=>sysdate+1.75/24, interval=>'sysdate+6/24'); commit; end ; end;