Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@NuroDev
Copy link
Contributor

@NuroDev NuroDev commented Dec 21, 2025

Right now if you add a schedule trigger / cron to an existing working and forget to enable the --test-scheduled it shows the following warning:

 ⛅️ wrangler 4.56.0
───────────────────
╭──────────────────────────────────────────────────────────────────────╮
│  [b] open a browser [d] open devtools [c] clear console [x] to exit  │
╰──────────────────────────────────────────────────────────────────────╯
▲ [WARNING] Scheduled Workers are not automatically triggered during local development.

  To manually trigger a scheduled event, run:
    curl "http://127.0.0.1:undefined/cdn-cgi/handler/scheduled"
  For more details, see
  https://developers.cloudflare.com/workers/configuration/cron-triggers/#test-cron-triggers-locally

The warning is correct, bug as you can see the port for the curl command is marked as undefined. This PR fixes that so the port is correctly assigned to the port of the dev server.


  • Tests
    • Tests included/updated
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Fixes a warning message only seen in the console.

A picture of a cute animal (not mandatory, but encouraged)

@NuroDev NuroDev self-assigned this Dec 21, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 21, 2025

🦋 Changeset detected

Latest commit: f80a3e8

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 21, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11731

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11731

miniflare

npm i https://pkg.pr.new/miniflare@11731

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11731

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11731

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11731

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11731

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11731

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11731

wrangler

npm i https://pkg.pr.new/wrangler@11731

commit: f80a3e8

logger.once.warn(
`Scheduled Workers are not automatically triggered during local development.\n` +
`To manually trigger a scheduled event, run:\n` +
` curl "http://${host}:${userWorkerUrl.port}/cdn-cgi/handler/scheduled"\n` +
Copy link
Contributor Author

@NuroDev NuroDev Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This does fix it so there is now a correct and working address provided, but only by providing the Miniflare port. This means the URL logged will differ from the final Ready at http://localhost:8787 URL shown below this warning message.

  To manually trigger a scheduled event, run:
    curl "http://127.0.0.1:61307/cdn-cgi/handler/scheduled"

@NuroDev NuroDev changed the title Fix local schedule worker warning message port fix(wrangler): Local schedule worker warning message is missing a port Dec 22, 2025
@claude
Copy link
Contributor

claude bot commented Dec 22, 2025

Claude finished @NuroDev's task —— View job


Changeset Review

✅ All changesets look good

  • Read changeset guidelines
  • Review changeset file
  • Validate version type
  • Check changelog quality
  • Check for markdown headers

The changeset .changeset/gentle-buses-go.md is properly formatted:

  • Version Type: Correctly uses patch for both wrangler and miniflare (bug fix)
  • Changelog Quality: Clear description with before/after context showing the problem (undefined port) and the fix
  • Markdown Headers: No h1/h2/h3 headers present
  • Multiple Packages: Appropriately includes both wrangler and miniflare as they're both affected by this fix

@NuroDev NuroDev marked this pull request as ready for review December 22, 2025 11:15
@NuroDev NuroDev requested a review from a team as a code owner December 22, 2025 11:15
@NuroDev
Copy link
Contributor Author

NuroDev commented Dec 23, 2025

Closing in favour of #11494

@NuroDev NuroDev closed this Dec 23, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Dec 23, 2025
@NuroDev NuroDev deleted the fix/miniflare-scheduled-local-warning branch January 12, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant