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

Charles

06/09/2023, 9:55 AM
I'm finding myself duplicating this piece of code a lot, once for each job despite the fact that the cron_schedule is exactly the same. Is there any way to assign multiple jobs the same schedule? What best practice here?
Copy code
job3_schedule = ScheduleDefinition(
    job=job3,
    cron_schedule="0 * * * *", # runs every hour
    default_status=DefaultScheduleStatus.RUNNING,
    name="job3_hourly_schedule",
    execution_timezone="UTC",
)
s

sandy

06/09/2023, 3:35 PM
Hi Charles - not currently. The best I can recommend is to right a helper function that constructs it with your default arguments.