Skip to content

Commit 9846cf9

Browse files
authored
Update cron-triggers.mdx
1 parent 0ccf024 commit 9846cf9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/content/docs/workers/configuration/cron-triggers.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,24 @@ Some common time intervals that may be useful for setting up your Cron Trigger:
173173

174174
## Test Cron Triggers locally
175175

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. To simulate different cron patterns, a `cron` query parameter can be passed in.
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.
177+
178+
```sh
179+
curl "http://localhost:8787/cdn-cgi/handler/scheduled"
180+
```
181+
182+
To simulate different cron patterns, a `cron` query parameter can be passed in.
177183

178184
```sh
179185
curl "http://localhost:8787/cdn-cgi/handler/scheduled?cron=*+*+*+*+*"
180186
```
181187

182188
Optionally, you can also pass a `time` query parameter to override `controller.scheduledTime` in your scheduled event listener.
183189

190+
```sh
191+
curl "http://localhost:8787/cdn-cgi/handler/scheduled?cron=*+*+*+*+*&time=1745856238"
192+
```
193+
184194
## View past events
185195

186196
To view the execution history of Cron Triggers, view **Cron Events**:

0 commit comments

Comments
 (0)