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
17 changes: 17 additions & 0 deletions products/workers/src/content/cli-wrangler/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Keys to configure per project in your `wrangler.toml`.
- `dev` <Type>not inherited</Type> <PropMeta>optional</PropMeta>
- Arguments for `wrangler dev`, configure local server

- `triggers` <Type>inherited</Type> <PropMeta>optional</PropMeta>
- Configures cron triggers for executing a Worker on a schedule

</Definitions>

### vars
Expand Down Expand Up @@ -229,6 +232,20 @@ You can learn more about the standard patterns used for include and exclude in t

Workers Sites projects use webpack by default. You can [bring your own webpack config](/cli-wrangler/webpack#using-with-workers-sites), however it is important to be cognizant of your `entry` and `context` settings.

### triggers

A set of cron triggers used to call a Worker on a schedule.

Usage:

```toml
[triggers]
crons = ["0 0 * JAN-JUN FRI", "0 0 LW JUL-DEC *"]
```

- `crons` optional
- A set of cron expressions, where each expression is a separate schedule to run the Worker on.

### dev

Arguments for `wrangler dev` can be configured here so you don't have to repeatedly pass them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Cron Triggers allow users to map a cron expression to a Worker script using a [S

## Adding Cron Triggers

Cron Triggers can be added to scripts with the Cloudflare API or in the dashboard on a [Workers Triggers tab](https://dash.cloudflare.com/?to=/:account/workers) up to the [per-script limit](/platform/limits).
Cron Triggers can be added to scripts with the Cloudflare API, or in the dashboard on a [Workers Triggers tab](https://dash.cloudflare.com/?to=/:account/workers) up to the [per-script limit](/platform/limits). If a script is managed with Wrangler, Cron Triggers should be exclusively managed through the **`wrangler.toml`** file.

![workers-schedule-editor](./media/workers-schedule-editor.png)

Expand Down