From Azure WebSite Always On and Meaning of "Always On" setting on Azure Web Site I assume that Azure WebJobs are hosted in IIS and uses IIS resources (and this our website resources).
Furthermore, in the pricing page: http://azure.microsoft.com/en-us/pricing/details/websites/ there is a statement:
Run custom executables and/or scripts on demand, on a schedule, or continuously as a background task within your Websites instance. Always On is required for continuous WebJobs execution. Azure Scheduler Free or Standard is required for scheduled WebJobs.
Therefore I assume that is true. Indeed Azure WebJobs are hosted in Azure Website's IIS. Note: WebJobs can be continuous and long running.
However, what worries me then, is that executing long running processes/background processes is often seen as anti-pattern:
So does Microsoft Azure propose something, which seems to be anti-pattern or not? Additional question: would it be a good idea then to run Quartz.NET as continuous task and have "free" simple background task scheduling?
If you set the web app that hosts your job to run continuously, run on a schedule, or use event-driven triggers, enable the Always on setting on your web app's Azure Configuration page. The Always on setting helps to make sure that these kinds of WebJobs run reliably.
Incorrect: WebJobs can be triggered by both queue messages and blobs. B. Incorrect: WebJobs can be created as standalone executables or scripts.
Azure WebJobs are deprecated, but still in use. They are being phased out in favor of Azure Functions. Azure Functions is a more up-to-date and feature rich service which offers a greater degree of flexibility and control.
Summary. Azure Functions offers more developer productivity than Azure App Service WebJobs does. It also offers more options for programming languages, development environments, Azure service integration, and pricing. For most scenarios, it's the best choice.
I'll try to address your two questions separately.
A given WebJob lives inside a Web App (or Mobile/API App). Each site has a Kudu instance running which manages things like deployments, IIS, and, important for us, WebJobs. So it is Hosted in a Web App, but it isn't necessarily managed by IIS, it's managed by the same thing that manages IIS for Web Apps. All this is available for review by you in the Kudu GitHub.
They're about as safe as any long running process, in that they aren't by themselves. If you just upload a console app as a continuous job and have it running in a while loop, it may crash at any time for any reason. With 'Always On', Kudu will always be awake to start it up again.
If you want some amount of assurance that things will be executed and not lost, try taking a look at the WebJobs SDK. It will actually track fail/success for Jobs and uses a Storage Queue to track history, allowing for retry and normal patterns for processing like poison messages, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With