Any reason why I can only invoke schedules created...
# ask-community
k
Any reason why I can only invoke schedules created from the decorator or
build_schedule_from_partitioned_job
but not from
ScheduleDefinition
? The latter method appears to return a
ScheduleDefinition
which is confusing. I'm attempting to test my schedules and verify the run_config is correct, maybe there's an alternate way to accomplish that?
n
+1 I've noticed the same thing as well
k
Ah well I found this: https://github.com/dagster-io/dagster/blob/master/python_modules/dagster/dagster/_core/definitions/partitioned_schedule.py#L50 So that explains the
build_schedule_from_partitioned_job
, but it would still be helpful to have a method to test direct invocations of
ScheduleDefinition
especially since the docs recommend that unless job run config needs to vary based on time.
c
what’s the error you’re getting when trying to invoke the schedule directly created?
k
Copy code
dagster._core.errors.DagsterInvalidInvocationError: Schedule invocation is only supported for schedules created via the schedule decorators.
while attempting to do something like this: https://docs.dagster.io/concepts/partitions-schedules-sensors/schedules#testing-schedules