1 Reply
It would be better to do the switch on the cron expression which you can get with
event.cron
https://developers.cloudflare.com/workers/runtime-apis/handlers/scheduled/#propertiesCloudflare Docs
Scheduled Handler · Cloudflare Workers docs
When a Worker is invoked via a Cron Trigger, the scheduled() handler handles the invocation.