Webjob on azure not running continuously even when Always on option is ON

Multi tool use
Webjob on azure not running continuously even when Always on option is ON
I am having a continuous Webjob which works fine for a couple of hours and then does not work until I restart. It seems to me azure takes it to idle mode but it shows me it's running but doesn't actually run. I have set the Always on option ON. I am having a paid plan with Azure. Do I need to use a timer or thread delay or some doughy code to keep it alive in my code? If that's the case whats the purpose of continuous option in webjob.
Someone use the Azure SDK in application which is not supported in the WebApp environment cause this problem, you could refer to it.
– Joey Cai
Jul 2 at 6:39
I am not using azure ask. And it happens Daily.
– maxspan
Jul 2 at 10:36
Any chance that your continuous job executable is terminating on its own? Continuous WebJobs need to have forever loops.
– David Ebbo
Jul 2 at 19:29
Thank you David. That means I need to add a Thread or timer to keep it awake.
– maxspan
Jul 2 at 22:11
1 Answer
1
Just to provide some documentation to back up the below comments you can have a look of the article here:
https://docs.microsoft.com/en-us/azure/app-service/web-sites-create-web-jobs#webjob-types
It provides the following information in regards to Continuous WebJobs:
Starts immediately when the WebJob is created. To keep the job from ending, the program or script typically does its work inside an endless loop. If the job does end, you can restart it.
I have outlined the part relevant to your question
Hope this helps provide some clarity
Cheers,
Lachie
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Is this happening multiple times, or just one time?
– Joy Wang
Jul 2 at 6:33