Share via


WebJob Not Running Consistently? Make sure always-on is on

I had a WebJob that wasn’t running consistently.  It was more of a learning experience than a production system.  I did a little research and found a couple of issues.  First of all I was running in the free tier of Azure Web Sites meaning I was not getting a limited number of cycles for the web job.  A bit more research indicated that I needed to have my web job setup to be always-on (https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/).  Why?  My web job was meant to and setup to run continuously, which means it need to “always-on” and ready to start executing immediately.  Always-on keeps and web site or web job warmed up ready to execute.  What happens if always-on is not on for a web site or web job?  If there isn’t activity the web site or web job will be unloaded. 

What did I do to get my web job to be always on?  First I needed to change my web hosting plan (WHP) to be either basic or standard because always on is only offered in those plans.  I choose standard. From there I went to the Configure tab in the portal and selected always-on.  See below.

image

 

image