Cron schedules
Defined in wrangler.jsonc triggers.crons. Two schedules currently.
0 6 * * * — daily 06:00Z (midnight MT)
Spawns DailyFlagSyncWorkflow which:
- Fetches all bookings within 365 days
- For each, calls
ensureBookingFlagWorkflow - New bookings get a workflow instance; existing ones get respawned (their workflow phases re-evaluate cleanly via idempotency)
The cold-start safety net. Most bookings get a workflow via the booking-event push webhook within seconds — this cron handles anything that slipped through.
*/15 * * * * — every 15 minutes
Runs three sweeps in sequence:
runBeds24MessageReconciliation— verifies our outbound Beds24 thread messages landed (fetches/bookings/messagesfor unverified bookings, matches by message-id, marks delivered)runDeliveryWatchdog— alerts Bill via SMS for any outbound_log row >10min old with no delivery confirmationrunSoftBounceSweep— checks for recipients with ≥3 temporary failures in 24h, alerts Bill once per 24h per recipient
Order matters: reconciliation FIRST so Beds24 thread sends don’t trigger watchdog false-positives.
What’s NOT a cron
Anything per-booking is a workflow step, not a cron:
- Arrival-day Bill emails — workflow
runArrivalDayBillEmail - Departure-day Bill emails — workflow
runDepartureDayBillEmail - 3pm still-dirty check — workflow
runStillDirtyCheck - A+1 check-in form chase — workflow
runArrivalPlusOneCheckinChase - All cleaner touchpoints
This follows the design principle: per-resource lifecycle stays in workflows; only account-wide sweeps use cron.
Source
wrangler.jsonc— cron triggerssrc/index.ts—scheduledhandler dispatches based onevent.cron