Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/best-practices/cost-optimization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ For very large payloads or binary data, store data externally (S3 or GCS) and pa

Audit Schedules periodically and delete the ones you no longer need, for example with `temporal schedule delete` (see [Delete](/cli/command-reference/schedule#delete)) or your SDK's delete-Schedule API.
Each [Schedule](/schedule) keeps its own backing Workflow Execution open for as long as the Schedule exists, so running Schedules contribute to Active Storage.
A Schedule that can no longer take scheduled Actions keeps contributing until [automatic deletion](/schedule#automatic-deletion) removes it.

**Considerations**:

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/dotnet/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ var handle = await client.CreateScheduleAsync(

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/go/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func CreateSchedule(ctx context.Context, temporalClient client.Client) (client.S

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/java/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ ScheduleHandle handle =

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/php/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ For more information, see the [PHP samples](https://github.com/temporalio/sample

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::
4 changes: 2 additions & 2 deletions docs/develop/python/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ if __name__ == "__main__":

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/ruby/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ handle = my_client.create_schedule(

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/typescript/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ The create action enables you to create a new Schedule. When you create a new Sc

:::tip Schedule Auto-Deletion

Once a Schedule has completed creating all its Workflow Executions, the Temporal Service deletes it since it won’t fire again.
The Temporal Service doesn't guarantee when this removal will happen.
The Temporal Service deletes a Schedule some time after it can no longer take scheduled Actions.
See [Automatic deletion](/schedule#automatic-deletion) for the conditions and timing.

:::

Expand Down
30 changes: 28 additions & 2 deletions docs/encyclopedia/workflow/schedule.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,33 @@ You might use this to fill in runs from a time period when the Schedule was paus

### Limit number of Actions

A Schedule can be limited to a certain number of scheduled Actions (that is, not trigger immediately).
After that it will act as if it were paused.
A Schedule can be limited to a certain number of scheduled Actions.
Manual triggers and Backfills don't count toward the limit, and they still work after the Schedule reaches it.
When the Schedule reaches the limit, it stops taking scheduled Actions.
Unlike a Paused Schedule, it then becomes eligible for [automatic deletion](#automatic-deletion).

### Automatic deletion

The Temporal Service automatically deletes a Schedule that can no longer take scheduled Actions.
A Schedule can no longer take scheduled Actions when any of the following is true:

- Its Spec has no future matching times, such as a calendar Spec restricted to a year that has passed.
- Its Spec defines no times at all, such as a Schedule that you only trigger manually.
- Its end time has passed.
- Limited Actions are enabled and the remaining Action count reaches zero.

A Paused Schedule isn't deleted, so you can resume it.
Pending Backfills also delay automatic deletion.

After a Schedule becomes eligible, the Temporal Service waits for a set period, separate from the Namespace [Retention Period](/temporal-service/temporal-server#retention-period), and then deletes it.
The Schedule has no setting for this period, and the exact deletion time isn't guaranteed.
The wait starts from the Schedule's most recent creation, update, or Action, so updating or triggering the Schedule starts the wait over.
An update that gives the Schedule future Actions, such as adding remaining Actions or moving its end time later, makes it active again.
You can describe the Schedule until it's deleted.
To remove it sooner, [delete the Schedule explicitly](/cli/command-reference/schedule#delete).

Deleting a Schedule, automatically or explicitly, doesn't cancel or terminate Workflow Executions that it started.
After the Schedule is deleted, you can reuse its Schedule ID.

### Last completion result

Expand Down Expand Up @@ -299,6 +324,7 @@ A Workflow started by a Schedule can obtain the details of the failure of the mo
Internally, a Schedule is implemented as a Workflow.
This backing Workflow Execution stays open for as long as the Schedule exists, so each running Schedule contributes to [Active Storage](/cloud/pricing#storage).
Deleting a Schedule you no longer need reduces this Active Storage footprint, but its closed history still counts toward [Retained Storage](/cloud/pricing#storage) for your Namespace's retention period afterward.
This includes a Schedule that can no longer take scheduled Actions, until [automatic deletion](#automatic-deletion) removes it.
See [Cost optimization: Storage](/best-practices/cost-optimization#active-storage) for more.

If you're using Elasticsearch, these Workflow Executions are hidden from normal views.
Expand Down
2 changes: 1 addition & 1 deletion docs/evaluate/features/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ There's no second system to deploy, monitor, and reconcile with your Workers, an
- **[Catchup Window](/schedule#catchup-window).** Which missed Actions to take when the Temporal Service was unavailable at the scheduled time. The default is one year; the minimum is ten seconds.
- **[Pause-on-failure](/schedule#pause-on-failure).** Pause the Schedule automatically when a scheduled Execution ends in failure or timeout.
- **[Backfill](/schedule#backfill).** Run every Action for a past time range now, including a range from before the Schedule existed.
- **[Action limit](/schedule#limit-number-of-actions).** Stop after a set number of scheduled Actions, after which the Schedule behaves as paused.
- **[Action limit](/schedule#limit-number-of-actions).** Take only a set number of scheduled Actions, after which the Schedule is eventually [deleted automatically](/schedule#automatic-deletion).

Every Execution a Schedule starts carries the `TemporalScheduledStartTime` and `TemporalScheduledById` [Search Attributes](/search-attribute), so you can query scheduled runs with a [List Filter](/list-filter) the same way you query anything else.

Expand Down
1 change: 1 addition & 0 deletions docs/troubleshooting/schedule-missed-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tags:
---

When a [Schedule](/schedule) does not start a Workflow Execution at its expected time, check whether the Schedule is paused or its end time has passed.
If `temporal schedule describe` can't find the Schedule, the Temporal Service might have [deleted it automatically](/schedule#automatic-deletion) after it stopped taking scheduled Actions.
An [Overlap Policy](/schedule#overlap-policy) can also skip or delay an Action, and a delayed Action can expire outside the [Catchup Window](/schedule#catchup-window).
Use the [common pitfalls](#common-pitfalls) below to recognize these behaviors, and use metrics and Schedule state to investigate missed Actions.

Expand Down