cancel
Showing results for 
Search instead for 
Did you mean: 

While loop never stop running

former_member280200
Participant
0 Kudos

Hi,

Can some please help me out with a while loop.

I have a job where I used the wait_for_file function to detect if a file exist and how many, then use a while loop to loop through the number of files to stage each and every single file until done.  Here is what my while loop looks like:

My problem is my job never stops, keeps running until I have to kill it manually.

Am I doing something wrong?

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187605
Active Contributor
0 Kudos

You must decrement the value of the global variable in a script. If not, the condition will always remain true. Hence the endless loop.