Page 1 of 1

Job Run Condition

Posted: Thu Mar 15, 2007 5:49 pm
by Amuktamalyada
Hi All,

I have a sequencer which is already in place.

We have realised that the job was runnig for tomorrow if accidentally ran by the support team.

This job gets its date from a table which holds run date for the job.

For instance : if the job ran for today and when accidentally some one runs it again it runs for tomorrow as the earlier run updates the table with the date as sysdate+1.

The idea is to write a routine which would control this.

I am laging behind in writing routines.Any help would be truly thanked.

Thanks,
Mukthi

Posted: Thu Mar 15, 2007 5:59 pm
by DSguru2B
Accidently huh? No amount of code can outsmart stupids.

Posted: Thu Mar 15, 2007 6:32 pm
by Amuktamalyada
This is definitely a challenge for me to learn it..

Posted: Thu Mar 15, 2007 6:44 pm
by DSguru2B
Ok, I am still blurry on the requirement. If todays cycle ran and someone tries to run it again it should not run. Is that correct?

Posted: Thu Mar 15, 2007 7:08 pm
by oacvb
Write a Stored Procedure and check for the existence of record for current day, if it's available throw an exception else insert a record in control table then it proceed as you want. Call the Stored Procedure from job. Hope it satisfies your requirement.

Posted: Thu Mar 15, 2007 8:38 pm
by ray.wurlod
You could always take a training class