I’ve written a powershell script that watches a specific directory. Once a file was placed in that directory it gets uploaded somewhere else by the script.
I’ve noticed that after a few hours the script somehow goes into “idle” state and doesn’t keep watching the folder anymore until I press any key. Then the script continious doing its job again.
This is very annyoing as the script needs to be awake 24/7.
Anyone has an idea why this happens? Btw. the script ist started via Windows Task Scheduler, the scheduler logs show that the task was in “running” state all the time so I think it couldn’t have been causing the “idle” state of the script.
Any help would be much appreciated.