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
|`schedule`| (string) A CRON expression used to schedule a triggered job. Example: `"0 */15 * * * *"`. Only applicable to triggered jobs. |
58
+
|`is_singleton`| (bool) Ensures only one instance of the job runs across all scaled-out instances. Default: `true` for continuous jobs, `false` for triggered/on-demand. |
59
+
|`stopping_wait_time`| (number, seconds) Grace period (default 5s) given to the script before it's killed when the WebJob is stopped (e.g., during site swaps or restarts). |
60
+
|`shutdownGraceTimeLimit`| (number, seconds) Max time (default 0s, meaning no limit) given for the entire WebJob process shutdown, including the `stopping_wait_time`, before it's forcefully terminated. |
61
+
|`run_mode`| (string) Values: `continuous`, `scheduled`, `on_demand`. Overrides job type detection based on the folder. |
62
+
63
+
> [NOTE]
64
+
> `stopping_wait_time` applies specifically to the running script's grace period, while `shutdownGraceTimeLimit` defines the overall process shutdown timeout. Consult the [Kudu documentation](https://github.com/projectkudu/kudu/wiki/WebJobs) for detailed behavior.
61
65
62
66
### Example
63
67
```json
64
68
{
69
+
"schedule": "0 0 * * * *", // Run once at the top of every hour
65
70
"is_singleton": true,
66
-
"stopping_wait_time": 10,
67
-
"shutdownGraceTimeLimit": 20,
68
-
"run_mode": "scheduled"
71
+
"stopping_wait_time": 60,
72
+
"shutdownGraceTimeLimit": 120
69
73
}
70
74
```
71
75
@@ -76,6 +80,7 @@ WebJob logs are handled by the Kudu engine and are available under the `App_Data
For more advanced monitoring and querying capabilities, consider integrating with [Application Insights](../../azure-monitor/app/app-insights-overview.md).
79
84
80
85
Triggered WebJobs include a full history of executions. Continuous WebJobs stream logs in real time.
81
86
@@ -85,9 +90,11 @@ Triggered WebJobs include a full history of executions. Continuous WebJobs strea
85
90
86
91
## Troubleshooting tips
87
92
88
-
-**WebJob not starting:** Check for a missing or misnamed `run.*` file.
89
-
-**Permissions error (Linux):** Ensure the script has execute permissions.
90
-
-**Job not stopping gracefully:** Use `settings.job` to define shutdown grace period.
93
+
-**WebJob not starting:** Check for a missing or misnamed `run.*` file. Ensure it's in the correct job folder (`triggered` or `continuous`).
94
+
-**Permissions error (Linux):** Ensure the script has execute permissions (`chmod +x run.sh`) and includes a valid shebang (e.g., `#!/bin/bash`).
95
+
-**Job not stopping gracefully:** Use `settings.job` to define `stopping_wait_time` and potentially `shutdownGraceTimeLimit`.
96
+
-**Scheduled job not running:** Verify the CRON expression in `settings.job` is correct and the App Service Plan has "Always On" enabled if needed.
97
+
-**Check Kudu logs:** Examine the detailed execution logs and deployment logs available in the Kudu console (`https://<your-app>.scm.azurewebsites.net/`) under Tools > WebJobs and potentially Log stream.
0 commit comments