This content has been marked as final. Show 7 replies
Hello,1 person found this helpful
use the CREATE_TIMER() built-in, then call that procedure in the When-Timer-Expired form level trigger.
keep in mind that the execution of the procedure is not asynchronous, so that the form will be frozen during the procedure execution .
Here is an example:1 person found this helpful
Declare timer_id Timer ; Begin timer_id := Create_Timer( 'procedure_timer', 15000, REPEAT ) ; End ;
If lower(Get_Application_Property( TIMER_NAME )) = 'procedure_timer' Then call_queue_cleanup; End if ;
Oh, I'm sorry. I meant to say that I wanted this to run on the database independent of my application. Is there any code you could share that might do this?
Create a database JOB (Oracle Scheduler)1 person found this helpful
Or maybe you could achieve that goal by launching another independant Forms dialog with the OPEN_FORM() built-in.
Hi. Thanks for the suggestion! However, I'm not certain my job/procedure is running successfully. Perhaps my syntax for calling the procedure is wrong? Any ideas? I'm not getting any errors when I create the job and I do see the dbms_output when I initially create it. Is there a special way to see if my job has run or has errors? Also, should I be seeing the dbms_output every 15 minutes or only the first time I create the job?
DECLARE X NUMBER; BEGIN SYS.DBMS_JOB.SUBMIT ( job => X ,what => 'call_queue_cleanup;' ,next_date => to_date('18/12/2012 09:42:44','dd/mm/yyyy hh24:mi:ss') ,interval => 'SYSDATE+15/1440 ' ,no_parse => TRUE ); SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x)); END; / commit;
See last_date/last_sec and next_date in all_jobs for informations on when your job was running the last time, how long it took and when it will run next time:
dba_jobs_running will give you informations on jobs currently running:
and last but not least the job_queue_processes parameter must be set to a value greater 0 so the database will run your submitted job: