- Double-click tWaitForFile to open its Basic settings view.
- In the Time (in seconds) between iterations field, enter the time interval in seconds between each two iterations. In this example, it is set to 5.
- In the Max. number of iterations (infinite loop if empty) field, enter the maximum number of iterations. In this example, it is set to 10.
From the Then drop-down list, select
continue loop to continue the iteration
loop after the message is triggered.
- As this scenario is based on Configuring the components (Waiting for a file to be created and stopping the iteration loop after a message is triggered), set the tJava components as in this scenario.
- Save the Job and press F6 to execute it.
Create a text file continue.txt in the
When a text file is created, a message about file creation is displayed on the Run console. The iteration loop is ended until the number of iterations reaches the maximum, 10 in this example, followed by another message showing the time the iteration loop is ended and the number of iterations executed.
Starting job tWaitForFile at 12:01 15/11/2022. [statistics] connecting to socket on port 3870 [statistics] connected A file was created at Tue Nov 15 12:01:21 CET 2022 Name of the created file: C:\Studio\continue.txt Iteration loop ended at Tue Nov 15 12:01:56 CET 2022 Number of iterations finished: 10 [statistics] disconnected Job tWaitForFile ended at 12:01 15/11/2022. [Exit code = 0]