Date Time Trigger setup

question about best practices really for running an automation at a certain time

I have an automation that searches an SFTP folder for new files and I only want it to run at 730 am…like so
image
I assumed we would setup the SFTP trigger with an AND and also the date/time trigger for the time. When I do this it returns two rows, one for the file and one completely blank for the trigger. Obviously I dont want or need the empty row, especially since it throws an error since the data is empty.

What would be the best way to setup the trigger(s) or schedule to only run a specific time and only return valid rows?

Hi Brent,

The DateTime trigger shown in your screenshot is the best scheduling approach.

Recommend you add a Conditional as the first action step to check what record is being processed. Use it to avoid processing the empty row emitted by the DateTime trigger.

Seems like we should modify the DateTime trigger to emit the current date and time rather than just an empty data row. Will make a note to address that.

Robert

If I added a filter to the datetime trigger, would it still kick off at that time and return the sftp row?

The automation will execute regardless of any trigger filter you add to the DateTime trigger. Can try that approach to see if better than the Conditional approach.

i will try that. I think that might work better since that would give it a filtered record instead of a success record. easier to track that way on true successful records instead of having a false record. if that makes sense

Yep, makes sense. The reason the DateTime trigger emits a record is for the case when it is the only trigger…actions have to have a data row to process.

im going to give that a try but i think the best way to do it is to add a checkbox on the trigger to emit row or not. that way you can use it in conjunction with another trigger and only get the records from that.

I think in theory you can copy that trigger and add that checkbox option yourself if you want to give that a go.

1 Like

Have looked into this in more detail. The emission of the data row is baked into the system, so it is not behavior you can control by making a custom assembly. I don’t see how an empty data row can be emitted, all Date Time triggers should always emit a data row containing date and time information. Please forward a link to a log if you see it emitting an empty data row.

sorry. to clarify, i meant a blank row in terms of the real trigger. it does emit the date/time. so what happens is for that run i have two records, one for the date/time and one for the actual trigger
image
Since the date/time record has no relevant data, it errors as is.

I think adding a condition to look for the filename from the actual trigger like you mentioned might be the only way to handle it…but then i would have two successful records when there is really only one.

Did you try a trigger filter on the Date Time trigger like this so its record won’t be emitted and processed?

I have not. I will have to give that a try.