How to Trigger Job if File Exists.

mehlank (2 posts)
March 3, 2006 01:28 PM
Accepted Answer
You can trigger a job if a file is created, changed, or deleted. But I can't figure out how to trigger a job if a file already exists. It would work if I trigger the job to run every minute and set a condition that the file must exists, but this causes a log entry of "skipped" to be created every minute. Anyone got any hints?
Kevin
rjdegraff (2 posts)
February 21, 2007 02:45 PM
Accepted Answer
What exactly is the "event" that you want to trigger on? File-exists is not an event, it is a condition.
You can't solve a problem with the same type of thinking that caused it.
mehlank (2 posts)
February 22, 2007 07:37 AM
Accepted Answer
True. File-exists is a condition. Actually I found a solution to my problem. The job in question is supposed to process a file that is being transfered via FTP. If adTempus is running, and file is transferred, then the operating system is able to tell adTempus that the file has been created. But unfortunately the adTempus service crashes from time to time. Not blamining adTempus, the problem could be Windows or some other rogue program. But the point is, that it is possible the file could be created when adTempus is not running. Thus, adTempus won't pick up the broadcast message from the operating system that the file was created. So, when adTempus is started, the job doesn't run, even though the file exists, and needs to be processed. The solution was to add a second trigger, run when adTempus is started with the condition that the file must exists.
-----------------------
If a tree falls in the woods will the bears still hibernate in the winter?!?
Kevin

Replies are disabled for this topic.