If the app pool stops, when my scheduled task will run again?
Hi,
I've set up a scheduled task to hit a page every minute and I'm trying to figure out when my scheduled task will run again after the app pool has stopped and started again.
I tried killing the app pool a few times in a row and I got unexpected results:
After this initial run the logs show me that it runs correctly every minute as it should.
My ultimate goal is to set this task to run every 24 hours, so if I can't make sure my app pool will be running for at least 24 hours, can I be sure the task will run at least once when the pool has started again?
The thing is I can't raelly make sure the app pool won't stop but I need to be sure the service will run at least once a day. It's not a big issue if it runs more frequently than once a day, it's just a waste. I am trying to understand how the scheduled tasks work. I guess what im tring to find out is if my scheduled task interval is bigger than the period the app pool is running, will my task ever run?
So I managed to run a few more tests. I set up my task to run every 5 minutes, and the Pool timeout for 20.
I found out that when the app pool dies, the Scheduled Task ran once after it had been restarted (between 10-60 seconds) after it had been restarded, and after that consistently every 5 minutes, until the pool dies. I left my machine runnign these all night long and this happened every single time. It seems I can rely on it to run my task once as soon as the app pool is restarted, and then after the set interval.
Any suggestions on how I can find out if this is realy the expected behavior?
If the app pool stops, when my scheduled task will run again?
Hi,
I've set up a scheduled task to hit a page every minute and I'm trying to figure out when my scheduled task will run again after the app pool has stopped and started again.
I tried killing the app pool a few times in a row and I got unexpected results:
Killed: 17:39:35 Restored 17:39:45 Task Run: 17:40:10
Killed: 17:41:00 Restored 17:41:15 Task Run: 17:41:36
Killed: 17:42:30 Restored 17:42:40 Task Run: 17:42:52
After this initial run the logs show me that it runs correctly every minute as it should.
My ultimate goal is to set this task to run every 24 hours, so if I can't make sure my app pool will be running for at least 24 hours, can I be sure the task will run at least once when the pool has started again?
Hi caio and welcome to our :)
I belive you should able to rely on the task running in the chosen interval if you make sure the app pool is not stopped at any given point.
Don't know if it would perhaps help to recycle the app pool at a certain interval and how it will perhaps affect the scheduled task though.
/Jan
Thanks for your reply!
The thing is I can't raelly make sure the app pool won't stop but I need to be sure the service will run at least once a day. It's not a big issue if it runs more frequently than once a day, it's just a waste. I am trying to understand how the scheduled tasks work. I guess what im tring to find out is if my scheduled task interval is bigger than the period the app pool is running, will my task ever run?
So I managed to run a few more tests. I set up my task to run every 5 minutes, and the Pool timeout for 20.
I found out that when the app pool dies, the Scheduled Task ran once after it had been restarted (between 10-60 seconds) after it had been restarded, and after that consistently every 5 minutes, until the pool dies. I left my machine runnign these all night long and this happened every single time. It seems I can rely on it to run my task once as soon as the app pool is restarted, and then after the set interval.
Any suggestions on how I can find out if this is realy the expected behavior?
is working on a reply...