Waiting for a file to be created and stopping the iteration loop after a message is triggered
This scenario describes a Job that scans a directory and triggers a message showing file creation information on the console when a text file is created in that directory. Immediately after this, the scanning is ended, followed by another message showing the number of iterations finished.