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
Copy file name to clipboardExpand all lines: src/content/docs/workers/configuration/cron-triggers.mdx
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,12 @@ Refer to the following additional examples to write your code:
71
71
72
72
### 2. Update configuration
73
73
74
+
:::note[Cron Trigger changes take time to propagate.]
75
+
76
+
Changes such as adding a new Cron Trigger, updating an old Cron Trigger, or deleting a Cron Trigger may take several minutes (up to 15 minutes) to propagate to the Cloudflare global network.
77
+
78
+
:::
79
+
74
80
After you have updated your Worker code to include a `"scheduled"` event, you must update your Worker project configuration.
75
81
76
82
#### Via the [Wrangler configuration file](/workers/wrangler/configuration/)
@@ -165,24 +171,24 @@ Some common time intervals that may be useful for setting up your Cron Trigger:
165
171
-`59 23 LW * *`
166
172
- 23:59 (UTC) on the last weekday of the month
167
173
168
-
## Test Cron Triggers
174
+
## Test Cron Triggers locally
169
175
170
-
The recommended way of testing Cron Triggers is using Wrangler.
171
-
172
-
:::note[Cron Trigger changes take time to propagate.]
176
+
Test Cron Triggers using Wrangler with [`wrangler dev`](/workers/wrangler/commands/#dev). This will expose a `/cdn-cgi/handler/scheduled` route which can be used to test using a HTTP request.
173
177
174
-
Changes such as adding a new Cron Trigger, updating an old Cron Trigger, or deleting a Cron Trigger may take several minutes (up to 15 minutes) to propagate to the Cloudflare global network.
Test Cron Triggers using `Wrangler` by passing in the `--test-scheduled` flag to [`wrangler dev`](/workers/wrangler/commands/#dev). This will expose a `/__scheduled` (or `/cdn-cgi/handler/scheduled` for Python Workers) route which can be used to test using a HTTP request. To simulate different cron patterns, a `cron` query parameter can be passed in.
182
+
To simulate different cron patterns, a `cron` query parameter can be passed in.
0 commit comments