Filetriggers

GuyS (45 posts)
October 31, 2019 05:01 AM
Accepted Answer

Hello,

 

Question about the FileTrigger. We have a process which can create a lot of files (1-100) in a couple of seconds. It will first delete the files (step1) and then creates them again (step-2).

I have a job which should start whenever a file is created (%DATADIR%\DHK6.PS*.WG.P*.DAT). For some reason the jobs didn't start. I haven't found out why not.

I changed the adTempus trigger, to start also when the files are modified. But when I saved the adTempus job, it started running for all the datasets which were created (so modified) in the past! This was not my intention. Is this the way it works, because I would expect it to run for NEWLY created/modified datasets.

 

Kind regards,

Guy Swagten 

 

 

Bill Staff (599 posts)
October 31, 2019 06:08 AM
Accepted Answer

The File Trigger works by scanning the target folder at the polling interval specified for the trigger. On each pass, it compares the list of files it finds to the list from the previous scan, to see which files have been created, modified, or deleted. If you delete a file and re-create it between scans, adTempus does not detect that as a new file--it sees it as a modification (because the file was present for both scans, but with a different timestamp). Therefore you need to check for Modified files if you have a scenario where a file can be deleted and re-created.

When you changed the setting, it appears that adTempus does not discard the previous scan results, so the next time it scanned, it saw that files have changed since the previous scan, and treated them as modifications. I have written up a bug report to change this behavior.

GuyS (45 posts)
October 31, 2019 07:25 AM
Accepted Answer

Hi Bill,

 

I almost understand. The pollinginterval on this trigger is 60 seconds. Trigger wildcard: %DATADIR%\DHK6.PS*.WG.P*.DAT

The 'list from the previous scan'? Is that when there was a hit, or 60 seconds before? 

I create files on

 - October 20, with qualifier PSH,

 - October 24 with qualifier PSL,

 - and October 31 with qualifier PSV,

This morning, only the When Created option was applicable. 

When I added the When Modified option, PSH, PSL and PSV datasets were processed. 

It might be the case, that I removed the When Modified, sometime last weeks, thinking it was not needed.

 

Does this still fit in your explanation?

 

Thanks,

Guy 

 

Bill Staff (599 posts)
October 31, 2019 02:46 PM
Accepted Answer

"List from the previous scan" is from 60 seconds ago. But I wasn't thinking straight when I gave my earlier answer--the polling doesn't explain why you got the results you got. Those older files shouldn't have been processed since they weren't changed since the last time it looked at them.

I will do a test and see what I can find out. This shouldn't affect you again since you've got the new setting in place, but if you'd like a fix for this, open a support case so we can do a hotfix for you.

Replies are disabled for this topic.