Hello! I would like to ask if there is a way for `...
# ask-community
a
Hello! I would like to ask if there is a way for
scheduled jobs
to run one run at a time. For example, I have a job that is scheduled to run now. But it takes 1 hour to finish running the job. If the schedule is set to 2 minutes, is there a way to queue the second run? wait for the first run to finish and then execute the second run?
a
If you use the
QueuedRunCoordinator
, you could set a tag on that job and only allow one job of that tag to run. See https://docs.dagster.io/guides/limiting-concurrency-in-data-pipelines for a whole lot more info
a
I see! but does it also work with jobs inside a schedule?
r
yes, scheduled jobs will also follow the configuration that adam linked above!
a
But its not working, after run1 automatically run2 will start even if run1 didnt terminate😅😭
Screenshot 2023-05-25 at 14.57.51.png
r
What you configured is concurrency *within a job*, which limits the number of ops executing in a run of a job. You want concurrency across jobs runs! Like Adam said, you need to configure: • A tag on the job • Configure your
QueuedRunCoordinator
to enforce a limit of
1
on that tag • Then you will get the behavior you want. You’ll want to follow this section instead: https://docs.dagster.io/guides/limiting-concurrency-in-data-pipelines#configuring-run-level-concurrency
a
Hello! Thank you for your help! I decided to use this method mentioned in the document since I could not alter the `dagster.yaml`file once the code is deployed. Thank you again for your help! 😊