Cron jobs#21
Conversation
Avoids potential undefined access by extracting the first element and checking for existence before calling `.getTime()`.
Greptile SummaryThis PR introduces cron job support for EdgePod Durable Objects, backed by the
Confidence Score: 5/5Safe to merge; the cron scheduling logic is correct for all practical schedule frequencies and the changes are well-isolated. The core alarm loop (scheduleNextAlarm → alarm() → handleCronAlarm → scheduleNextAlarm) is sound for schedules at or above 2-minute intervals, which covers all common use cases. The two findings are quality improvements: early validation of cron expressions in createSchedule, and trimming do.ts by one line to stay within the stated file-length limit. Neither affects runtime correctness. packages/server/src/tools/createSchedule.ts (expression validation) and packages/server/src/server/do.ts (file length). Important Files Changed
|
Cron handlers now receive the scheduled execution time as a parameter rather than capturing the current time. This ensures consistent tracing and context across async operations.
No description provided.