Skip to content

Commit c4aacba

Browse files
authored
Merge pull request #299309 from MicrosoftDocs/main
Publish to live, Sunday 4:00 PM PST, 05/04
2 parents 7dd8ed0 + 098a74f commit c4aacba

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

articles/app-service/webjobs-execution.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,26 @@ ms.service: azure-app-service
66
author: msangapu-msft
77
ms.author: msangapu
88
ms.date: 05/01/2025
9+
ms.collection: ce-skilling-ai-copilot
910
---
1011

1112
# How WebJobs run in Azure App Service
1213

13-
Azure WebJobs allow you to run background tasks within your App Service app, without needing separate infrastructure. These tasks are discovered and managed by the **Kudu engine**, which handles execution, monitoring, and log collection.
14+
Azure WebJobs allow you to run background tasks within your App Service app, without needing separate infrastructure. These tasks are discovered and managed by the Kudu engine, the built-in App Service deployment and runtime management service. Kudu handles WebJob execution, file system access, diagnostics, and log collection behind the scenes.
1415

1516
This article explains how WebJobs are discovered, how the runtime decides what to execute, and how you can configure behavior using the optional `settings.job` file.
1617

18+
## Platform-specific notes
19+
20+
WebJobs support a variety of script and executable formats, depending on the App Service hosting environment. The types of files you can run—and the runtimes available—vary slightly based on whether you're using Windows code, Linux code, or custom containers. In general, built-in runtimes are available for common scripting languages, and additional file types are supported when they match the language runtime of your app or container.
21+
22+
[!INCLUDE [webjob-types](./includes/webjobs-create/webjob-types.md)]
23+
24+
>[!IMPORTANT]
25+
> WebJobs that are continuous, scheduled, or event-driven may stop running if the web app hosting them becomes idle. Web apps can time out after 20 minutes of inactivity, and only direct requests to the app reset this idle timer. Actions like viewing the portal or accessing the Kudu tools do not keep the app active.
26+
> To ensure WebJobs run reliably, enable the Always on setting in the Configuration pane of your App Service.
27+
> This setting is available only in the Basic, Standard, and Premium pricing tiers.
28+
1729
## Job discovery and folder structure
1830

1931
WebJobs are stored in the `site/wwwroot/App_Data/jobs/` folder of your App Service app. There are two subfolders:
@@ -34,10 +46,7 @@ Inside the job folder, the Kudu engine looks for a file to execute. This file ca
3446

3547
The WebJobs runtime uses a file named `run.*` (such as `run.py`, `run.sh`, or `run.js`) as the explicit entry point for a job. This file tells the platform which script or binary to execute first, ensuring consistent and predictable behavior across environments.
3648

37-
> [!NOTE]
38-
> The filename must be exactly `run.*` to be autodetected. Files like `start.sh` or `job.py` will be ignored unless manually triggered.
39-
40-
If no `run.*` file is found, the platform attempts to detect a fallback entry point by selecting the first supported file based on the language platform of the WebJob. For example:
49+
The filename must be exactly `run.*` to be autodetected. Files like `start.sh` or `job.py` will be ignored unless manually triggered. If no `run.*` file is found, the platform attempts to detect a fallback entry point by selecting the first supported file based on the language platform of the WebJob. For example:
4150
- A Python WebJob with multiple `.py` files (for example, `file1.py`, `file2.py`) will execute the first `.py` file it finds in the archive.
4251
- A Node.js WebJob looks for the first `.js` file.
4352
- A Bash-based WebJob looks for the first `.sh` script.
@@ -82,10 +91,6 @@ For more advanced monitoring and querying capabilities, consider integrating wit
8291

8392
Triggered WebJobs include a full history of executions. Continuous WebJobs stream logs in real time.
8493

85-
## Platform-specific notes
86-
87-
[!INCLUDE [webjobs-always-on-note](../../includes/webjobs-always-on-note.md)]
88-
8994
## Troubleshooting tips
9095

9196
- **WebJob not starting:** Check for a missing or misnamed `run.*` file. Ensure it's in the correct job folder (`triggered` or `continuous`).

0 commit comments

Comments
 (0)