Docs: Scheduling recipes - Desktop and Temporal (#3452)

This commit is contained in:
Emma Youndtsmith
2025-07-16 10:57:20 -05:00
committed by GitHub
parent eda810040d
commit f8a12a6189
3 changed files with 58 additions and 16 deletions

View File

@@ -223,7 +223,7 @@ You can turn your current Goose session into a reusable recipe that includes the
Using a recipe with the Goose CLI might involve the following tasks:
- [Configuring your recipe location](#configure-recipe-location)
- [Running a recipe](#run-a-recipe)
- [Scheduling a recipe](#schedule-a-recipe)
- [Scheduling a recipe](#schedule-recipe)
#### Configure Recipe Location
@@ -383,19 +383,6 @@ You can turn your current Goose session into a reusable recipe that includes the
- Your session won't affect the original recipe creator's session
:::
#### Schedule a Recipe
Automate Goose recipes by running them on a schedule.
**Create a schedule** - Create a scheduled cron job that runs the recipe on the specified cadence.
```bash
# Add a new scheduled recipe which runs every day at 9 AM
goose schedule add --id daily-report --cron "0 0 9 * * *" --recipe-source ./recipes/daily-report.yaml
```
The [cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) follows the format "seconds minutes hours day-of-month month day-of-week".
See the [`schedule` command documentation](/docs/guides/goose-cli-commands#schedule) for detailed examples and options.
</TabItem>
</Tabs>
@@ -445,6 +432,49 @@ You can turn your current Goose session into a reusable recipe that includes the
</TabItem>
</Tabs>
## Schedule Recipe
<Tabs groupId="interface">
<TabItem value="ui" label="Goose Desktop" default>
Automate Goose recipes by running them on a schedule.
1. click the gear icon `⚙️` in the top right corner
2. Select **Scheduler**
3. Click **Create New Schedule**
3. In the dialog that appears:
- Provide a **Name** for the schedule
- Select the **Source** of your recipe. This can be either a `yaml` file or link generated by Goose Desktop.
- Select whether you want your recipe to run in the background or foreground. Recipes run in the background don't open a window, but the session results are saved. Recipes run in the foreground will open a window if the Goose Desktop app is running. Otherwise, the recipe runs in the background.
- Choose the **Frequency** and timing for your recipe. Your selected frequency (e.g. every 20 minutes, weekly at 10 AM on Friday) is converted into a [cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) used by Goose.
- Click **Create Schedule**
Your new scheduled recipe is listed in the **Schedules Management** section. Click on the schedule to view details, see when it was last run, and perform actions with the scheduled recipe:
- **Run Schedule Now** to trigger the recipe manually
- **Edit Schedule** to change the scheduled frequency
- **Pause Schedule** to stop the recipe from running automatically.
At the bottom of the **Schedule Details** screen you can view the list of sessions created by the scheduled recipe and open or restore each session.
</TabItem>
<TabItem value="cli" label="Goose CLI">
Automate Goose recipes by scheduling them to run with a [cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression).
```bash
# Add a new scheduled recipe which runs every day at 9 AM
goose schedule add --id daily-report --cron "0 0 9 * * *" --recipe-source ./recipes/daily-report.yaml
```
You can use either a 5, 6, or 7-digit cron expression for full scheduling precision, following the format "seconds minutes hours day-of-month month day-of-week year".
See the [`schedule` command documentation](/docs/guides/goose-cli-commands.md#schedule) for detailed examples and options.
When scheduling Goose recipes with the CLI, you can use Goose's built-in cron scheduler (default), or the [Temporal scheduler](https://docs.temporal.io/evaluate/development-production-features/schedules) (requires the Temporal CLI). Switch from the default legacy scheduler by setting the `GOOSE_SCHEDULER_TYPE` [environment variable](/docs/guides/environment-variables.md#session-management):
```bash
export GOOSE_SCHEDULER_TYPE=temporal
```
Use Temporal scheduling if you want an advanced workflow engine with monitoring features. The scheduling engines do not share schedules, so schedules created with the legacy Goose scheduler cannot be run with the Temporal scheduler, and vice-versa.
</TabItem>
</Tabs>
## Core Components
A recipe needs these core components: