Repeat step
The Repeat step repeatedly executes a group of task steps until one or more configured exit conditions are met.
The Repeat step is designed for scenarios where Automate MFT must continuously poll for files or repeatedly perform processing during a defined time window. It prevents extra status/error messaging by allowing multiple checks for files before sending a post-task message.
Repeat step limitations
- A task can contain only one Repeat step.
- The Repeat step can exist only at the root level of a task.
- The Repeat step cannot be used in the Post Run section.
- Steps contained within the Repeat step execute repeatedly until an exit condition is met.
Add a repeat step
- Open a task in edit mode.
- Click the insert step icon (
) and select Advanced > Repeat. - Configure the Exit Conditions, Sleep Interval, and Error Handling.
- Click Save.
Exit Conditions
You can configure one or more exit conditions. The Repeat step stops when any configured exit condition is satisfied.
Supported exit conditions include:
- Exit when step duration is reached: Stops repeating after the specified amount of elapsed time. The maximum duration is 6 hours for self-hosted agents and 1 hour for Progress-Hosted agents.
- Exit after number of files are found by this step: Stops repeating after the specified number of files have been collected into the task cache.
- Exit after number of iterations: Stops repeating after the specified number of executions of the Repeat loop.
Sleep Interval
The Repeat step includes a delay setting that specifies how long Automate MFT waits before beginning the next iteration. The minimum delay is 10 seconds.
Error Handling
You can configure the number of failed iterations that are allowed before the task fails.
This setting allows temporary endpoint or network failures to occur without immediately stopping task execution.
Collect Only New support
When Source Download or Destination Upload steps are used inside a Repeat step, the Collect only files newer than the last successfully processed file option can be used to prevent the same files from being processed repeatedly.
This is particularly useful when monitoring folders for new file arrivals over time.
Common use cases
The Repeat step can be used to implement several common workflow patterns.
Repeat until first success
Use this approach to keep a task running while waiting for files to become available at the source location. The Repeat step supports multiple exit conditions and configurable error handling, providing more flexibility than the source step's Retry if no files found option.
For more detailed information, see Repeat until first success.
Fail at end of period
Use this approach when a task must wait for files to become available, but should fail if the files are not found within a specified time period. This extends the Repeat until first success pattern by adding a check that fails the task when the Repeat step completes due to a timeout rather than finding the expected files.
For more information, see Fail at end of period.
Trigger file processing
Use this scenario when files should be processed only after a specific trigger file is detected.
A simple trigger file workflow can be implemented by applying appropriate file filters to the source and destination steps. This allows the task to wait for the trigger file and process the associated files while excluding the trigger file itself.
For more advanced requirements, a trigger file can be used to define which files are downloaded from a source. This approach combines a Repeat step, file filters, and a script to provide greater control over file selection and processing. For a complete configuration example, see Trigger file processing.
Polling unreliable systems
Use this scenario when a source endpoint may be temporarily unavailable or may occasionally return errors. For a complete configuration example, see Polling unreliable systems.