We have a job which executes whenever the file is available. The file is available once in a quarter, but the problem is if the file is available more than once within a same quarter then the job will get executed that many times. I want to circumvented this by introducing a condition like if the job has already ran for that particular quarter then it should not run in that particular quarter even the file is available multiple times.
Can anyone please let me know how can I acheive this?
Job Scheduler is capable of doing this. Your scheduling people would be able to assist you with your job.
For CA7 & control-m there is a calendar feature which allows the job to be scheduled each month/quater/year.
Not sure about other schedulers.
It's a weird requirement, but still do'able. You need to use a flag file in order to determine whether to process the file/not. Inside the job which is getting triggered after each arrival of the file, place a check at first step whether this is the first run. If first run continue processing and update the flag file for completion of first run.
When the flag file is updated, the second run check will fail and processing should be discontinued. Also using scheduler place another job to run at end of every quarter to clear the flag file.