Maybe I misunderstand the job, but if you are waiting for a file to arrive in a folder, why don't you use a file trigger?
Good question: It's a complex job. I actually use a file trigger to start the job initially. It copies a file to a processing folder, then waits for that file to be processed (by another service) then moved to an archive folder. VisualCron will then alert us if the file hasn't processed by the "deadline," which is variable based on the number of lines in the file.
I tried, but I don't think there's a way to incorporate a second trigger into the same job. I experimented with creating a "follow up" job, but this was very messy, and ultimately didn't work, since passing the variables to the second job requires running the first task, and thus couldn't activate a trigger.
To add even more complexity, it is possible that additional (smaller) files could be dropped into this folder before the first one has completed. If I had a follow-up task, and I could somehow activate a variable file trigger, that trigger could be modified again, causing the first job to report a failure. Keeping each file within its own job makes this a reliable process.
Maybe I missed something, and I would actually prefer to use a file trigger in some way, but I couldn't figure out a way to do it.
Edited by user
2017-08-31T15:49:50Z
|
Reason: Additional detail