Repeat until first success
Use this scenario when files are expected to arrive within a time window and should be processed as soon as they become available. This approach allows a task to continue running while waiting for files, rather than repeatedly starting and stopping based on a schedule.
A common use case is a file delivery that may occur at any time during a one-hour period. Instead of scheduling frequent task executions, a single task can wait for the files to arrive, process them, and then complete.
How It Works
The task repeatedly checks the source location for files.
The Repeat step exits successfully when either:
- The expected number of files is found.
- The configured time limit is reached.
During each iteration:
- A Download step checks the source location for new files.
- The Repeat step evaluates its exit conditions.
- If an exit condition is not met, the Repeat step waits for the configured interval before checking again.
- When the required number of files is found, the Repeat step exits and task processing continues.
- The downloaded files are processed by subsequent task steps.
Configure the Task
-
Add a Repeat step to the task.
-
Configure the Repeat step to exit when the expected number of files has been found.
-
Add a second exit condition based on elapsed time. For example: 1 hour.
-
Within the Repeat step, add a Download step configured to download files from the source location.
-
Configure the Download step to collect only files that have not already been processed.
-
Set Collect only files newer than the last successfully processed file to True.
This prevents the same files from being collected multiple times if the Repeat step performs multiple iterations.
-
After the Download step, add the processing steps required by your workflow, such as an Upload, Move, or Delete step.
When the required number of files is found, the Repeat step exits and the task continues with the remaining processing steps.