Sorry I had just adjusted the bottom it was the same as the original I sent. I added the Sleep(10000) and it helped no longer have the issue of it trying to open over and over, however now I'm finding that the first If statements seems to randomly close the processes. $StartTimer = TimerInit() ; Define the initial time we will be comparing to laterCheckprocess() ; Run our checkprocess() function on initial executeWhile 1 ; Infinite Loop Condition is always true, you can exit these loops with "ExitLoop" If TimerDiff($StartTimer) > 600000 Then ; Only run the conditional code if the difference in time is greater than 1 min (600000 Miliseconds) Checkprocess() EndIf Sleep(10) ; So we don't kill the CPUWEnd ; End of While LoopFunc Checkprocess()If Not ProcessExists("Process1.exe") Then ProcessClose("Process2.exe") And ProcessClose("Process3.exe")If Not ProcessExists("Process2.exe") Then ProcessClose("Process1.exe") and ProcessClose("Process3.exe")If Not ProcessExists("Process3.exe") Then ProcessClose("Process1.exe") and ProcessClose("Process2.exe")If Not ProcessExists("Process1.exe") and Not ProcessExists("Process2.exe") and Not ProcessExists("Process3.exe") Then Run("C:\Restart.bat"); if the processes don't exist, it starts the script Sleep(10000) ; So we don't kill the CPUEndFunc ;==>Checkprocess Due to the process closing issue even if the process did exist I tried another way. I don't have the issue with the program restarting however if one process is closed it does not close the other two I have to manually close them all to get it to then restart. $StartTimer = TimerInit() ; Define the initial time we will be comparing to later Checkprocess() ; Run our checkprocess() function on initial execute While 1 ; Infinite Loop Condition is always true, you can exit these loops with "ExitLoop" If TimerDiff($StartTimer) > 20000 Then ; Only run the conditional code if the difference in time is greater than 1 min (20000 Miliseconds) Checkprocess() EndIf Sleep(100) ; So we don't kill the CPU WEnd ; End of While Loop Func Checkprocess() If Not ProcessExists("Process1.exe") Or Not ProcessExists("Process2.exe") Or Not ProcessExists("Process3.exe") Then ProcessClose("Process1.exe|Process1.exe|Process1.exe") Sleep(100) ; So we don't kill the CPU If Not ProcessExists("Process1.exe") And Not ProcessExists("Process2.exe") And Not ProcessExists("Process3.exe") Then Run("C:\Script.bat"); if the processes don't exist, it starts the script Sleep(10000) ; So we don't kill the CPU EndFunc ;==>Checkprocess