First, what are WebJobs exactly?
WebJobs in Microsoft Azure provide a method for running background tasks on your Azure websites. Remember that Azure websites, now they’re called web apps. They’re running on Windows server back ends, and you’re hosting those websites within the VMs using IIS. Of course in a platform-as-a-service architecture, we don’t have the underlying operating system access, which means that we’re relying upon Microsoft to expose what they want to. In Windows Server, for instance, we can use Windows Task Scheduler or the PowerShell jobs architecture to run background tasks. WebJobs is the interface for doing that in the Azure web apps platform-as-a-service.
WebJobs are invoked in two different ways, either they are triggered or they are continuously running. Triggered jobs happen on a schedule or when some event happens and Continuous jobs basically run a while loop.
There are a few different kinds of job run types
On Demand – In this Administrator will trigger the start of a job.
Continuous – In this job is continuously running after start. It uses scheduler service in Azure which is not part of WebJobs, Azure scheduler is ly a separate standalone component.
Scheduled – In this job will fire off as you schedule it. It also uses azure scheduler.
On Demand – In this Administrator will trigger the start of a job.
Continuous – In this job is continuously running after start. It uses scheduler service in Azure which is not part of WebJobs, Azure scheduler is ly a separate standalone component.
Scheduled – In this job will fire off as you schedule it. It also uses azure scheduler.
Here’s some typical scenarios that would be great for the Windows 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.
WebJobs Supported File Types
The following file types are accepted as runnable scripts that can be used as a job:
.exe – .NET assemblies compiled with the WebJobs SDK
.cmd, .bat, .exe (using windows cmd)
.sh (using bash)
.php (using php)
.py (using python)
.js (using node)
.cmd, .bat, .exe (using windows cmd)
.sh (using bash)
.php (using php)
.py (using python)
.js (using node)
No comments:
Post a Comment