Workers, Cloudflare CLI - Test Cron Triggers with Local Explorer
- Announced
- Tags
- Workers, Cloudflare-CLI
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-10-17-local-explorer-cron-triggers/
<p>Local Explorer can now send one-off Cron Trigger invocations to a Worker's <code>scheduled()</code> handler during local development. This removes the need to construct request URLs when testing handler behavior.</p> <p>Start your local development server with <a href="https://developers.cloudflare.com/cf/projects/#start-development"><code>cf dev</code></a>, <a href="https://developers.cloudflare.com/workers/wrangler/commands/general/#dev"><code>wrangler dev</code></a>, or the <a href="https://developers.cloudflare.com/workers/vite-plugin/">Cloudflare Vite plugin</a>. Open <code>/cdn-cgi/local/explorer</code> on the server URL and select <strong>Cron Triggers</strong>.</p> <p>The browser interface supports the following tasks:</p> <ul> <li>Invoke configured cron expressions</li> <li>Build ad hoc expressions</li> <li>Set reusable scheduled times</li> <li>Inspect outcomes and <code>noRetry()</code> status</li> </ul> <p>Ad hoc triggers and scheduled time presets stay in your browser. They do not change <code>cloudflare.config.ts</code>, your Wrangler configuration, or deployed Cron Triggers. Local development does not run cron schedules automatically.</p> <p>Full logs and traces are available in the development session that owns the Worker when that session has <strong>Observability</strong> turned on.</p> <p>The following example uses port <code>8787</code>. Replace it with your development server port, such as <code>5173</code> for Vite.</p> <p>The Local Explorer API exposes the same operation for tools and AI agents. The request targets an exact Worker name and accepts a cron expression and optional scheduled time:</p> <figure class="nb-code-figure" data-nb-lang="sh"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="sh" data-nb-lang="sh"><code><span class="line"><span class="nb-shiki-1t8gfj">curl</span><span class="nb-shiki-dzsirb"> -X</span><span class="nb-shiki-mdbnqw"> POST</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-mdbnqw"> "http://localhost:8787/cdn-cgi/local/explorer/api/local/scheduled?worker=my-worker"</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-dzsirb"> -H</span><span class="nb-shiki-mdbnqw"> "Content-Type: application/json"</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-dzsirb"> --data</span><span class="nb-shiki-mdbnqw"> '{"cron":"0 * * * *","scheduled_time":1745856238000}'</span></span></code></pre></figure> <p>For more details, refer to <a href="https://developers.cloudflare.com/workers/local-development/local-explorer/#test-cron-triggers">Test Cron Triggers with Local Explorer</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.