You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "An overview of Azure WebJobs, covering its types, supported platforms, file types, scheduling with NCRONTAB expressions, deployment options, and benefits for background processing within Azure App Service."
3
+
description: Learn about Azure WebJobs, including types, supported platforms, file types, scheduling, deployment, and background processing in Azure App Service.
Azure WebJobs is a built-in feature of [Azure App Service](overview.md) that enables you to run background tasks, scripts, and programs alongside your web, API, or mobile applications. WebJobs simplify automation for common operations—such as data processing, image resizing, queue handling, or file cleanup—by running in the same scalable, managed environment as your application.
18
+
Azure WebJobs is a built-in feature of [Azure App Service](overview.md) that enables you to run background tasks, scripts, and programs alongside your web, API, or mobile applications. WebJobs simplify automation for common operationsby running in the same scalable, managed environment as your application. Common operations include data processing, image resizing, queue handling, and file cleanup.
19
19
20
20
## Choosing WebJobs
21
21
22
22
WebJobs are a good fit when:
23
-
- You're already hosting your application on App Service.
23
+
24
+
- You already host your application on App Service.
24
25
- You want to deploy and manage background tasks together with your app.
25
26
- You don't require a separate scaling model or event-based triggers beyond basic scheduling or queue polling.
26
27
@@ -41,7 +42,7 @@ WebJobs come in three main types:
41
42
42
43
-**Triggered WebJobs**: Run on demand or in response to specific events. You can trigger them manually or from a service like Azure Storage.
43
44
-**Scheduled WebJobs**: A specialized type of triggered WebJob that runs on a defined schedule using a `settings.job` file with [NCRONTAB expressions](webjobs-create.md#ncrontab-expressions).
44
-
-**Continuous WebJobs**: Run persistently in the background while your App Service app is running. Ideal for queue polling or background monitoring tasks.
45
+
-**Continuous WebJobs**: Run persistently in the background while your App Service app runs. Ideal for queue polling or background monitoring tasks.
45
46
46
47
:::image type="content" border="false" source="media/overview-webjobs/webjob-types-app-service.png" alt-text="Diagram overview of WebJobs in Azure App Service, showing job types.":::
47
48
@@ -51,43 +52,43 @@ WebJobs come in three main types:
51
52
52
53
You can deploy WebJobs using several methods:
53
54
54
-
-**Azure portal or zip upload**: Manually upload your script or job files.
55
+
-**The Azure portal** or **zip upload**: Manually upload your script or job files.
55
56
-**Visual Studio**: Deploy directly with your ASP.NET app to Windows App Service.
56
-
-**CI/CD pipelines**: Automate deployment with GitHub Actions, Azure DevOps, or Azure CLI.
57
+
-**CI/CD pipelines**: Automate deployment with GitHub Actions, Azure Pipelines, or Azure CLI.
57
58
-**ARM/Bicep templates**: Deploy infrastructure and jobs declaratively.
58
59
59
-
WebJobs also provide **built-in logging**via Kudu and integration with App Service diagnostics to help you monitor job activity and troubleshoot issues.
60
+
WebJobs also provide **built-in logging**by using Kudu and integration with App Service diagnostics to help you monitor job activity and troubleshoot issues.
60
61
61
62
## Scaling considerations
62
63
63
64
WebJobs scale together with your App Service plan. If your app is configured to scale out to multiple instances, your WebJobs run on each instance as appropriate:
64
-
-**Triggered WebJobs** will run on a single instance by default.
65
+
66
+
-**Triggered WebJobs** runs on a single instance by default.
65
67
-**Continuous WebJobs** can be configured to run on all instances or a single one using the `WEBJOBS_RUN_ONCE` setting.
66
68
67
-
If you need independently scalable or event-driven execution, [Azure Functions](../azure-functions/functions-overview.md)may be more appropriate.
69
+
If you need independently scalable or event-driven execution, [Azure Functions](../azure-functions/functions-overview.md)might be more appropriate.
68
70
69
71
## Best practices
70
72
71
73
- Use **triggered** WebJobs for improvised or scheduled operations.
72
-
- Use **continuous** WebJobs only when the task needs to run constantly (e.g., polling a queue).
73
-
- Implement **retry logic and error handling**within your scripts.
74
+
- Use **continuous** WebJobs only when the task needs to run constantly, such as polling a queue.
75
+
- Implement **retry logic** and **error handling**in your scripts.
74
76
- Use **application logging** and **Kudu logs** to monitor job behavior.
75
77
- Keep job logic **separate from main app logic** when possible.
76
-
- Use **storage-based triggers** (e.g., Azure Queues) for reliable, decoupled communication.
77
-
78
+
- Use **storage-based triggers**, such as Azure Queues, for reliable, decoupled communication.
78
79
79
80
## Choose your scenario
80
81
81
82
| Goal | Article |
82
83
|------|---------|
83
-
| Quickly run a scheduled WebJob |[Quickstart: Create a scheduled WebJob](quickstart-webjobs.md)|
84
+
| Quickly run a scheduled WebJob |[Create a scheduled WebJob](quickstart-webjobs.md)|
84
85
| Build a WebJob manually using scripts or code |[Create a WebJob in Azure App Service](webjobs-create.md)|
85
-
| Follow a tutorial using a practical use case |[Tutorial: Run background tasks with WebJobs](tutorial-webjobs.md)|
86
+
| Follow a tutorial using a practical use case |[Build a scheduled WebJob](tutorial-webjobs.md)|
86
87
87
-
## <aname="NextSteps"></a> Next steps
88
+
## <aname="NextSteps"></a> Related content
88
89
89
-
-[Review background jobs best practices – Azure Architecture Center](/azure/architecture/best-practices/background-jobs)
90
-
-[Develop WebJobs using Visual Studio](webjobs-dotnet-deploy-vs.md)
90
+
-[Review background jobs best practices](/azure/architecture/best-practices/background-jobs)
91
+
-[Develop and deploy WebJobs using Visual Studio](webjobs-dotnet-deploy-vs.md)
91
92
-[Get started with the WebJobs SDK](webjobs-sdk-get-started.md)
92
-
-[Use the WebJobs SDK to build advanced jobs](webjobs-sdk-how-to.md)
93
+
-[Use the WebJobs SDK for background processing](webjobs-sdk-how-to.md)
93
94
-[Review Kudu WebJobs reference on GitHub](https://github.com/projectkudu/kudu/wiki/WebJobs)
0 commit comments