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
> WebJobs aren't supported in custom Linux containers based on Alpine Linux, including Linux apps using Java 8 and Java 11 runtime stacks. Starting with Java 17 Linux apps, Azure App Service uses non-Alpine based images, which are compatible with WebJobs.
- Any language runtime included in your container app
30
+
31
+
This versatility enables you to integrate WebJobs into a wide range of application architectures using the tools and languages you're already comfortable with.
Copy file name to clipboardExpand all lines: articles/app-service/overview-webjobs.md
+5-23Lines changed: 5 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,27 +42,9 @@ WebJobs come in three main types:
42
42
-**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).
43
43
-**Continuous WebJobs**: Run persistently in the background while your App Service app is running. Ideal for queue polling or background monitoring tasks.
44
44
45
-
46
45
:::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
46
48
-
## Supported platforms and file types
49
-
50
-
WebJobs are supported on the following App Service hosting options:
51
-
52
-
- Windows code
53
-
- Windows containers
54
-
- Linux code
55
-
- Linux containers
56
-
57
-
Supported file/script types include:
58
-
59
-
- Windows executables and scripts: `.exe`, `.cmd`, `.bat`
- Any language runtime included in your container app
64
-
65
-
This versatility enables you to integrate WebJobs into a wide range of application architectures using the tools and languages you're already comfortable with.
47
+
[!INCLUDE [webjobs supported platforms and file types](./includes/webjobs-create/webjobs-supported-platforms.md)]
66
48
67
49
## Deployment options
68
50
@@ -77,15 +59,15 @@ WebJobs also provide **built-in logging** via Kudu and integration with App Serv
77
59
78
60
## Scaling considerations
79
61
80
-
WebJobs scale together with your App Service plan. If your app is configured to scale out to multiple instances, your WebJobs will run on each instance as appropriate:
62
+
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:
81
63
-**Triggered WebJobs** will run on a single instance by default.
82
64
-**Continuous WebJobs** can be configured to run on all instances or a single one using the `WEBJOBS_RUN_ONCE` setting.
83
65
84
66
If you need independently scalable or event-driven execution, [Azure Functions](../azure-functions/functions-overview.md) may be more appropriate.
85
67
86
68
## Best practices
87
69
88
-
- Use **triggered** WebJobs for ad hoc or scheduled operations.
70
+
- Use **triggered** WebJobs for improvised or scheduled operations.
89
71
- Use **continuous** WebJobs only when the task needs to run constantly (e.g., polling a queue).
90
72
- Implement **retry logic and error handling** within your scripts.
91
73
- Use **application logging** and **Kudu logs** to monitor job behavior.
@@ -103,8 +85,8 @@ If you need independently scalable or event-driven execution, [Azure Functions](
103
85
104
86
## <aname="NextSteps"></a> Next steps
105
87
106
-
-[Background jobs best practices – Azure Architecture Center](/azure/architecture/best-practices/background-jobs)
88
+
-[Review background jobs best practices – Azure Architecture Center](/azure/architecture/best-practices/background-jobs)
107
89
-[Develop WebJobs using Visual Studio](webjobs-dotnet-deploy-vs.md)
108
90
-[Get started with the WebJobs SDK](webjobs-sdk-get-started.md)
109
91
-[Use the WebJobs SDK to build advanced jobs](webjobs-sdk-how-to.md)
110
-
-[Kudu WebJobs reference on GitHub](https://github.com/projectkudu/kudu/wiki/WebJobs)
92
+
-[Review Kudu WebJobs reference on GitHub](https://github.com/projectkudu/kudu/wiki/WebJobs)
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-webjobs.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,6 +235,10 @@ node webjob.js
235
235
236
236
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. All app service plans support WebJobs at no additional cost. This sample uses a scheduled (Triggered) WebJob to output the system time once every minute.
237
237
238
+
> [!IMPORTANT]
239
+
> WebJobs aren't supported in custom Linux containers based on Alpine Linux, including Linux apps using Java 8 and Java 11 runtime stacks. Starting with Java 17 Linux apps, Azure App Service uses non-Alpine based images, which are compatible with WebJobs.
240
+
>
241
+
238
242
## Prerequisites
239
243
240
244
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
@@ -267,13 +271,13 @@ public class HelloWorld {
267
271
268
272
### Build the Java WebJob
269
273
270
-
1. The `run.sh` script runs a jar with the name that setin the Maven configuration. This script will run when our WebJob is triggered.
274
+
1. The `run.sh` script runs a jar with the name that sets in the Maven configuration. This script runs when our WebJob is triggered.
271
275
272
276
```bash
273
277
java -jar webjob-artifact-1.0.0.jar
274
278
```
275
279
276
-
1. Next, we compile the Java project to produce the executable `.jar`. There are multiple ways to do this, but for this example, we’ll use Maven. Run the following commands from the `project/` directory:
280
+
1. Next, we compile the Java project to produce the executable `.jar`. There are multiple ways to do this, but for this example, we use Maven. Run the following commands from the `project/` directory:
277
281
278
282
```bash
279
283
mvn install
@@ -318,7 +322,7 @@ public class HelloWorld {
318
322
319
323
:::zone target="docs" pivot="php"
320
324
321
-
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. All app service plans support WebJobs at no additional cost. This sample uses a scheduled (Triggered) WebJob to output the system time once every minute.
325
+
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. All app service plans support WebJobs at no extra cost. This sample uses a scheduled (Triggered) WebJob to output the system time once every minute.
322
326
323
327
## Prerequisites
324
328
@@ -329,7 +333,7 @@ WebJobs is a feature of Azure App Service that enables you to run a program
329
333
330
334
## Download the sample WebJob
331
335
332
-
You can [download a pre-built sample project](https://github.com/Azure-Samples/App-Service-PHP-WebJobs-QuickStart/archive/refs/heads/main.zip) to get started quickly. The sample includes two files: `webjob.php` and `run.sh`.
336
+
You can [download a prebuilt sample project](https://github.com/Azure-Samples/App-Service-PHP-WebJobs-QuickStart/archive/refs/heads/main.zip) to get started quickly. The sample includes two files: `webjob.php` and `run.sh`.
333
337
334
338
The PHP script, `webjob.php`, outputs the current time to the console as shown below:
0 commit comments