Skip to content

Commit ecb2b39

Browse files
qingfeng777nhavensAnton GilgurAnton Gilgur
committed
fix(docs): clarify CronWorkflow startingDeadlineSeconds. Fixes #12971 (#13280)
Signed-off-by: qingfeng777 <[email protected]> Signed-off-by: Anton Gilgur <[email protected]> Signed-off-by: Anton Gilgur <[email protected]> Co-authored-by: Neile Havens <[email protected]> Co-authored-by: Anton Gilgur <[email protected]> Co-authored-by: Anton Gilgur <[email protected]> (cherry picked from commit 9c5dd5b)
1 parent 4e711d6 commit ecb2b39

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/cron-workflows.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The resulting `Workflow` name will be a generated name based on the `CronWorkflo
4545
| `timezone` | Machine timezone | Timezone during which the Workflow will be run from the IANA timezone standard, e.g. `America/Los_Angeles` |
4646
| `suspend` | `false` | If `true` Workflow scheduling will not occur. Can be set from the CLI, GitOps, or directly |
4747
| `concurrencyPolicy` | `Allow` | Policy that determines what to do if multiple `Workflows` are scheduled at the same time. Available options: `Allow`: allow all, `Replace`: remove all old before scheduling a new, `Forbid`: do not allow any new while there are old |
48-
| `startingDeadlineSeconds` | `0` | Number of seconds after the last successful run during which a missed `Workflow` will be run |
48+
| `startingDeadlineSeconds` | `0` | Number of seconds after the last scheduled time during which a missed `Workflow` will still be run. See [Crash Recovery](#crash-recovery) for more details. |
4949
| `successfulJobsHistoryLimit` | `3` | Number of successful `Workflows` that will be persisted at a time |
5050
| `failedJobsHistoryLimit` | `1` | Number of failed `Workflows` that will be persisted at a time |
5151

@@ -57,9 +57,11 @@ More detailed documentation for the specific library used is [documented here](h
5757

5858
### Crash Recovery
5959

60-
If the `workflow-controller` crashes (and hence the `CronWorkflow` controller), there are some options you can set to ensure that `CronWorkflows` that would have been scheduled while the controller was down can still run. Mainly `startingDeadlineSeconds` can be set to specify the maximum number of seconds past the last successful run of a `CronWorkflow` during which a missed run will still be executed.
60+
If the Controller crashes, you can ensure that any missed schedules still run.
6161

62-
For example, if a `CronWorkflow` that runs every minute is last run at 12:05:00, and the controller crashes between 12:05:55 and 12:06:05, then the expected execution time of 12:06:00 would be missed. However, if `startingDeadlineSeconds` is set to a value greater than 65 (the amount of time passing between the last scheduled run time of 12:05:00 and the current controller restart time of 12:06:05), then a single instance of the `CronWorkflow` will be executed exactly at 12:06:05.
62+
With `startingDeadlineSeconds` you can specify a maximum grace period past the last scheduled time during which it will still run.
63+
For example, if a `CronWorkflow` that runs every minute is last run at 12:05:00, and the controller crashes between 12:05:55 and 12:06:05, then the expected execution time of 12:06:00 would be missed.
64+
However, if `startingDeadlineSeconds` is set to a value greater than 5 (the time passed between the last scheduled time of 12:06:00 and the current time of 12:06:05), then a single instance of the `CronWorkflow` will be executed exactly at 12:06:05.
6365

6466
Currently only a single instance will be executed as a result of setting `startingDeadlineSeconds`.
6567

0 commit comments

Comments
 (0)