Has anyone encountered this exception under the Sc...
# ask-community
b
Has anyone encountered this exception under the Schedules tab? Recently upgraded from 1.3.x to 1.6.9 and the scheduler was not working anymore.
Copy code
Operation name: SingleScheduleQuery

Message: Invariant failed.

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

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

Stack Trace:
  File "/usr/local/lib/python3.11/site-packages/graphql/execution/execute.py", line 521, in execute_field
    result = resolve_fn(source, info, **args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster_graphql/schema/instigation.py", line 709, in resolve_nextTick
    return get_schedule_next_tick(graphene_info, self._instigator_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster_graphql/implementation/fetch_schedules.py", line 233, in get_schedule_next_tick
    next_timestamp = next(time_iter).timestamp()
                     ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dagster/_utils/schedules.py", line 833, in schedule_execution_time_iterator
    yield from (
  File "/usr/local/lib/python3.11/site-packages/dagster/_utils/schedules.py", line 767, in cron_string_iterator
    check.invariant(next_date.timestamp() >= start_timestamp)
  File "/usr/local/lib/python3.11/site-packages/dagster/_check/__init__.py", line 1577, in invariant
    raise CheckError("Invariant failed.")
d
Hi, a similar issue was reported here and it turned out to be a problem with setting the timezone on the container where Dagster was running: https://github.com/dagster-io/dagster/issues/19892#issuecomment-1964573001 - would you mind commenting on that issue with more information if you're still hitting this and that doesn't help resolve it?
b
Appreciate the quick reply, I managed to resolve the issue, and it is indeed related to the
TZ
environment variable. I'll add more detail under the GitHub issue.
🙏 1