https://dagster.io/ logo
#ask-community
Title
# ask-community
r

Riccardo Tesselli

07/19/2023, 2:32 PM
👋 I’ve got this Dagster Instance error, I believe it happened because I’ve set an “impossible” cron in some of my schedules (0 0 31 2 *). I needed it because in test environment I don’t want a particular schedule to ever run, so I’ve set the impossible cron. I’ve fixed by turning off the schedule on dagit and no errors are showing up since
Copy code
Operation name: SingleScheduleQuery

Message: failed to find prev date

Path: ["scheduleOrError","scheduleState","nextTick"]

Locations: [{"line":21,"column":9}]

Stack Trace:
  File "/usr/local/lib/python3.7/site-packages/graphql/execution/execute.py", line 521, in execute_field
    result = resolve_fn(source, info, **args)
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/schema/instigation.py", line 695, in resolve_nextTick
    return get_schedule_next_tick(graphene_info, self._instigator_state)
  File "/usr/local/lib/python3.7/site-packages/dagster_graphql/implementation/fetch_schedules.py", line 214, in get_schedule_next_tick
    next_timestamp = next(time_iter).timestamp()
  File "/usr/local/lib/python3.7/site-packages/dagster/_utils/schedules.py", line 275, in schedule_execution_time_iterator
    start_timestamp, cron_schedule, execution_timezone
  File "/usr/local/lib/python3.7/site-packages/dagster/_utils/schedules.py", line 103, in cron_string_iterator
    next_date = date_iter.get_prev(datetime.datetime)
  File "/usr/local/lib/python3.7/site-packages/croniter/croniter.py", line 200, in get_prev
    return self._get_next(ret_type or self._ret_type, is_prev=True)
  File "/usr/local/lib/python3.7/site-packages/croniter/croniter.py", line 286, in _get_next
    nth_weekday_of_month, is_prev)
  File "/usr/local/lib/python3.7/site-packages/croniter/croniter.py", line 559, in _calc
    raise CroniterBadDateError("failed to find prev date")
c

claire

07/19/2023, 11:14 PM
Hi Riccardo. Ideally we would populate the error at definition time so it wouldn't be possible to set an "impossible" schedule, but glad that things are working for you after turning off the schedule