RE: Job Scheduler

"pep0" <[email protected]> Thu, 13 Mar 2003 10:25:19 -0000
Newsgroups gmane.comp.db.oracle.devel
Organization SW16
Message-ID <LYRIS-1796914-910336-2003.03.13-10.24.54--gcdod-oracle#[email protected]>
Hi!!

You have to use the DBMS_JOB package, which is designed to support batch
job submissions. The most important procedure in this package is
SUBMIT... the name says everything ;D
The procedure header looks like this:

PROCEDURE SUBMIT(JOB	OUT BINARY_INTEGER,
			WHAT	IN VARCHAR2,
			NEXT_DATE	IN	DATE,
			INTERVAL	IN	VARCHAR2,
			NO_PARSE	IN	BOOLEAN,
			INSTANCE	IN	BINARY_INTEGER,
			FORCE		IN BOOLEAN);

Where job is an internal number that will be stored in an OUT variable,
what is a string with the name of the procedure that you want to submit,
or one or more PL/SQL statements ending in semicolons. Next_date is when
you want the job to execute, interval ... Mnnn... You know!. No_parse,
boolean value... Instance and force.. Both used for executing under
Oracle Parallel Server, I can't explain those :(

And... Here is an example!!
Your program will be executed in one our!!

DBMS_JOB.SUBMIT (v_job_number,
			'YOUR_STORED_PROGRAM_NAME',
			(SYSDATE+1/24),
			FALSE,
			NULL,
			NULL);

You'll find also useful the REMOVE procedure... 

Hope this helps! Have a good day!!!


pep0. <-- www.pep0.demon.co.uk --> ... Do you have a developer vacancy
in London? contact me! ...





> -----Mensaje original-----
> De: Chris Sol [mailto:[email protected]] 
> Enviado el: jueves, 13 de marzo de 2003 9:39
> Para: Oracle
> Asunto: [oracle] Job Scheduler
> 
> 
> Hi
> 
> Anybody know How do you schedule a job in Oracle?
> 
> Thanks
> 
> Chris Sol
> Analyst Programmer
> IT Development
> Genesis Housing Group
> Telephone 02085374169
> 
> 
> **************************************************************
> **************
> The Genesis Housing Group - Email Disclaimer
> --------------------------------------------
> The information in this email and any attachments is strictly 
> confidential and may be legally privileged. It is intended 
> solely for the use of the addressee(s) only. Access to this 
> email by anyone else is unauthorised.  If you have received 
> this email in error please notify the sender immediately by 
> return email or telephone.  Please note that if you are not 
> the intended recipient, you must not copy, distribute or 
> otherwise act on any part of this email or it's attachments. 
> Although we have taken precautions to ensure that this email 
> and attachments are free from any virus, we would advise you 
> that it is your responsibility to ensure that this is true 
> when reading or actioning this email.
> 
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or 
> to unsubscribe send a blank email to 
> %%email.unsub%%.
> 
> 



---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to [email protected].