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

Kirk Stennett

01/17/2023, 4:51 PM
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

Nicholas Pezolano

01/17/2023, 5:07 PM
+1 I've noticed the same thing as well
k

Kirk Stennett

01/17/2023, 5:12 PM
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

chris

01/18/2023, 12:07 AM
what’s the error you’re getting when trying to invoke the schedule directly created?
k

Kirk Stennett

01/18/2023, 1:43 PM
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