I have a website which I need to run a script every hour. I set these parameters on task scheduler and it seems to work.
Program/script: powershell.exe
Add arguments: -c (new-object system.net.webclient).downloadstring('http://www.example.com/test.ashx')
The problem is that I have a big loop and processes in this script and the script stops before it finish the loop! Is there any possibility to add a timeout as an argument or something else to prevent this?
I'm using Windows Server 2008R2 and .NET 4