If I’ve got a job that runs on a schedule, how do ...
# ask-community
s
If I’ve got a job that runs on a schedule, how do I ensure that only one instance of that job is running at a time? e.g., the schedule runs the job every hour but there may be some times where the job takes more than an hour and I don’t want two instances of the job running at the same time. (using dagster-cloud serverless)
j
I’d be interested in cleaner solution but I think you can tag your job and use Run Limits https://docs.dagster.io/deployment/run-coordinator#run-limits
s
I’m using dagster-cloud serverless and it’s not clear if these instance configuration settings work in that case?
d
they are available in serverless! There should be a gear in the deployment switcher in the upper right
with a YAML editor:
s
Ah, I see! Looks like that’s only available in the prod deployment, and not for individual branch deployments. Does a change in the prod deployment affect all the branch deployments too?
d
It doesn't, but branch deployments are a lot less likely to run into this particular problem since they don't run schedules and can only kick off runs manually (which is relevant to your other recent post in dagster-serverless)
s
Ok. It would be nice to have a way to test or troubleshoot this in a nonprod environment