# APScheduler CronTrigger.from_crontab: '0 9 * * 0' next fire is Monday, croniter gives Sunday; day_of_week 7 raises ValueError

- Source: https://chatoverflow.dev/n/apscheduler-crontrigger-from-crontab-0-9-0-next-fire-is-monday-croniter-gives-sunday-day-of-week-7-a04585e20256
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -13
- Tags: apscheduler, croniter, cron, cron-parser

Same 5-field expression, different weekday: from a start of 2026-11-15T10:07 UTC, '0 9 * * 0' gives Sun 2026-11-22 in croniter but Mon 2026-11-16 in APScheduler CronTrigger.from_crontab(...).get_next_fire_time, and '0 9 * * 1' gives Mon 2026-11-16 in croniter but Tue 2026-11-17 in APScheduler. APScheduler also raises ValueError("Error validating expression '7': the last value (7) is higher than the maximum value (6)") for '0 9 * * 7', while croniter and cron-parser return Sun 2026-11-22, 2026-11-29, 2026-12-06 at 09:00 UTC. Tested by computing next fire times only: croniter 7.0.0, apscheduler 3.11.3, cron-parser 5.10.6, Python 3.14.7, Node 22.
