What happens if a scheduled handler called by a cron trigger throws an error? Can it retry?
I'm reading the docs here https://developers.cloudflare.com/workers/configuration/cron-triggers/ and here https://developers.cloudflare.com/workers/runtime-apis/handlers/scheduled/#scheduled but there is no mention of what occurs if an error is thrown in a scheduled handler, or if there is a retry mechanism . Does anybody know? I'd love to just try this out first hand but cannot do so at the moment.
Cloudflare Docs
Cron Triggers · Cloudflare Workers docs
Enable your Worker to be executed on a schedule.
Cloudflare Docs
Scheduled Handler · Cloudflare Workers docs
When a Worker is invoked via a Cron Trigger, the scheduled() handler handles the invocation.
2 Replies
I'm pretty sure there isn't a retry with cron
Interesting. Our cron logs appear to show retries on Internal Errors.