Just a quick suggestion, I'm sure there are more elegant ways to do that, if you think about it longer.
How about a Dummy Job before the filewatcher that sets a starting condition at the time the filewatcher has to start. The filewatcher deletes that starting condition, once he is finished. So you're done for the day.
1. Dummy sets START_FILEWATCHER ODATE
2. FILEWATCHER has IN-Condition START_FILEWATCHER ODATE
3. FILEWATCHER deletes IN-Conditione START_FILEWATCHER ODATE after completion.
4. Job2 runs.
Hi @Lars Mahrendorf
Thank you for your reply.
I am convinced that this is a condition removal action. What you suggested will do the trick and I will test it.
But I need to do it without adding a new job to the chain.
If you have other alternative, Let me know it please !
1 of 1 people found this helpful
It sounds like Job1 is a cyclic job?
I.e. FW JOB1 runs every X minutes.
If file is not found it starts again X min later.
If file is found it triggers JOB2 and you don't want JOB1 to run anymore for that day.
If this is the case, you can add an ON/DO statement for JOB1:
On COMPSTAT=0 (which is the return code of FW when a file is found)
DO Stop Cyclic
With the above, when file is found JOB1 will go to ENDED OK and not run anymore.
By default, all ENDED OK jobs get removed at New Day.
So as long as JOB1 is scheduled to be ordered every day, the one from previous day will get removed and a new copy will be ordered and start as normal on the next day.
NOTE: it is recommended that JOB1 as a Keep Active value set to 0 so that it gets removed at New Day even if it has not ENDED OK.