bynk.cron.invalid_schedule
Error A cron schedule is not valid Cloudflare cron syntax: a field is out of range or malformed, or the fields are not separated by exactly one space.
A cron schedule is Cloudflare's five-field syntax: minute 0-59, hour 0-23, day of month 1-31 (also L and W), month 1-12 or JAN-DEC, and day of week 1-7 with 1 as Sunday, or SUN-SAT (also L and #). *, ,, - and / work in every field. There are no seconds, no year, no ? and no @daily-style macros. Fields are separated by exactly one space, with none leading or trailing, because Cloudflare hands the handler that exact string back and dispatches on it character for character. Bynk checks all of this at compile time, so a schedule Cloudflare would reject is caught before deploy, not when it silently never runs; the message names the failing field. The same rule is the Cron refinement predicate, and CronSchedule is the type of a valid schedule. A bad parameter or return type on the handler is bynk.cron.bad_params or bynk.cron.return_not_effect_result.
Example
on schedule("61 * * * *") () -> Effect[Result[(), String]] { … } // ✗ minute 61 is outside 0-59
on schedule("0 3 * * *") () -> Effect[Result[(), String]] { … } // ✓ 03:00 UTC every dayIn the Book
See also
- The grammar rule it governs:
cron_handler. - Every code in its category, Cron, on the diagnostic index.
bynk explain bynk.cron.invalid_scheduleshows the same from the installed toolchain, without a network.