Author : MD TAREQ HASSAN | Updated : 2020/10/09
What is WebJob?
WebJobs is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app, API app, or mobile app.
In their simplest form, Azure WebJobs allow you to write background code that executes in the context of your web application or website. That means they’re not dependent on user interaction, but they are able to access the file system and other things that are available to your website.
See details: Azure App Service WebJobs
Console app as webjob
- Deployment
- Push console app by Azure DevOps pipeline to specified folder in Azure App Service
- Triggered (default type):
wwwroot\data\jobs\triggered\{job name}
- Continuous:
wwwroot\data\jobs\continuous\{job name}
- Triggered (default type):
- Deploy directly from Visual Studio
- Push console app by Azure DevOps pipeline to specified folder in Azure App Service
- Console app should contain
settings.job
(contains cron/schedule settings)
Job Settings
settings.job
(To execute job in every 5 minutes)
{
"schedule": "0 */5 * * * *"
}