페이로드 v4: 더 엄격한 cron — sloppyRanges가 사라짐

작성자

카테고리:

← 피드로
DEV Community · Kacper Zawojski · 2026-06-24 개발(SW)

Kacper Zawojski

Watch out for this one when upgrading to Payload v4: cron parsing got stricter.

After the Croner bump to v10, the sloppyRanges escape hatch is gone. Stepping in a cron expression now has to be syntactically correct, or you get a TypeError at registration time — instead of it being silently ignored:

- cron: '/10 * * * *'      // missing prefix — throws
+ cron: '*/10 * * * *'

- cron: '5/15 * * * *'     // numeric prefix — throws
+ cron: '5-59/15 * * * *'  // explicit range

Enter fullscreen mode Exit fullscreen mode

This applies everywhere you write a schedule: jobs.autoRun[].cron, schedule.cron, and the --cron flag on the binary. The good news is the failure is loud — a malformed expression that used to quietly never fire now throws on startup, so you find out immediately.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다