Showing posts with label Azure WebJobs. Show all posts
Showing posts with label Azure WebJobs. Show all posts

Azure Crash Course - WebJobs

  1. Azure WebJobs is similar to AWS Lambda a serverless technology.
You can run programs or scripts in WebJobs in your Azure App Service web app in three ways:
On demand – You trigger it when you need.
Continuously – It will keep on running in background always.
Schedule – You can schedule it to run on specific date and time.
Following file types are accepted:-
  • .cmd, .bat, .exe (using windows cmd)
  • .ps1 (using powershell)
  • .sh (using bash)
  • .php (using php)
  • .py (using python)
  • .js (using node)
  • .jar (using java)
Interestingly Azure WebJobs supports shell scripts which is missing in AWS Lambda.
The WebJobs SDK does not yet support .NET Core.
Typical use case for Azure WebJobs:-
  • Image processing or other CPU-intensive work.
  • Queue processing.
  • RSS aggregation.
  • File maintenance, such as aggregating or cleaning up log files.
  • Other long-running tasks that you want to run in a background thread, such as sending emails.
  • Any tasks that you want to run on a schedule, such as performing a back-up operation every night.
Do Note
  • Web apps in Free mode can time out after 20 minutes if there are no requests to the scm (deployment) site and the web app’s portal is not open in Azure. Requests to the actual site will not reset this.
  • Code for a continuous job needs to be written to run in an endless loop.
  • Continuous jobs run continuously only when the web app is up. Check what’s a Web App .
  • Basic and Standard modes offer the Always On feature which, when enabled, prevents web apps from becoming idle.
  • You can only debug continuously running WebJobs. Debugging scheduled or on-demand WebJobs is not supported.
This article was written to give you quick snapshot of WebJobs.  You can follow this Azure Doc to check how to quickly deploy apps with WebJobs.
Azure Crash Course series is created to give you quick snapshot of Azure services. You can check other services in this series over here .