Skip to content

Commit 2fefda1

Browse files
committed
rever order execution content
1 parent 0858ca2 commit 2fefda1

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

articles/app-service/webjobs-execution.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,27 @@ Inside the job folder, the Kudu engine looks for a file to execute. This file ca
3232

3333
## Entry point detection
3434

35-
The WebJob runtime executes the **first valid script or binary** it finds based on this order:
36-
37-
1. `run.cmd`
38-
2. `run.bat`
39-
3. `run.exe`
40-
4. `run.ps1`
41-
5. `run.sh`
42-
6. `run.py`
43-
7. `run.php`
44-
8. `run.js`
45-
9. `run.fsx`
35+
The WebJob runtime looks for a file named `run.*` (such as `run.sh`, `run.py`, or `run.js`) as the entry point for the job. This allows you to control exactly what script or binary runs first, regardless of language or file type.
4636

47-
> [!NOTE]
48-
> The file must be named exactly `run.*` — not `start.sh` or `job.py`.
49-
>
37+
If a `run.*` file is not found, the platform falls back to executing the first valid script or binary it recognizes in the archive. This detection follows the order below:
38+
39+
- `run.cmd`
40+
- `run.bat`
41+
- `run.exe`
42+
- `run.ps1`
43+
- `run.sh`
44+
- `run.py`
45+
- `run.php`
46+
- `run.js`
47+
- `run.fsx`
48+
49+
> [!NOTE]
50+
> The file must be named exactly `run.*` to be recognized automatically—names like `start.sh` or `job.py` will not be treated as entry points.
51+
52+
On Linux-based apps, `.sh` scripts must include a shebang (#!) and must have executable permissions.
53+
54+
To ensure consistent behavior across environments and avoid unpredictable results (especially when multiple script files are included), it’s strongly recommended to include a `run.*` file.
5055

51-
The platform uses a run.* file (such as run.sh, run.py, or run.js) as the entry point for a WebJob. If no recognized run.* file is present, it may attempt to execute the first supported script file it finds in the archive. This fallback behavior can be unpredictable—especially when multiple script files are included—so it's strongly recommended to explicitly define a run.* file to ensure reliable execution. On Linux, `.sh` scripts must have a shebang (`#!`) and executable permissions.
5256

5357
## WebJob configuration with settings.job
5458

0 commit comments

Comments
 (0)