What's the recommended way to run a single job/ass...
# ask-community
n
What's the recommended way to run a single job/asset group on multiple schedules? Create a job for each schedule of the same asset group?
c
Hi Nicholas. Yep, I would recommend creating a different schedule for the same job/asset group as desired.
D 1
n
Thanks, If I use the same job it throws an error
dagster._core.errors.DagsterInvalidDefinitionError: Duplicate definition found for my_job_schedule
So I create a new job with the same asset group?
c
So schedule names need to be unique (as do jobs, assets, sensors, etc). My guess as to why you're seeing this is you have something like:
Copy code
my_schedule = ScheduleDefinition(
    job=my_job, cron_schedule="5 8 * * 1-5", execution_timezone='America/New_York'
)

schedule_2 = ScheduleDefinition(
    job=my_job, cron_schedule="* 8 * * 1-5", execution_timezone='America/New_York'
)
which creates two schedules with name
my_job_schedule
. You'll need to specify the name param on one of those schedules to give it a different unique name:
Copy code
schedule_2 = ScheduleDefinition(
    job=my_job, cron_schedule="* 8 * * 1-5", execution_timezone='America/New_York', name="foo"
)