Hello, I have scheduled a deployment to run every ...
# ask-community
b
Hello, I have scheduled a deployment to run every 15 minutes. However, there are instances where it may take longer to complete, which could potentially trigger the commencement of the subsequent deployment while the current one is still running. To prevent overlapping executions, I would prefer either to have the upcoming deployment automatically cancel itself, or to have the subsequent deployments adjust their schedule to realign with the original 15-minute interval. One solution I am considering is dedicating a worker pool to this deployment with a concurrency limit set to 1, assuming I've interpreted the documentation accurately. Would this approach work, or is there a better alternative to ensure that only one deployment runs at a time? Thank you for your assistance!
b
Hey Brian, yes, this approach should work!
> To prevent overlapping executions, I would prefer either to have the upcoming deployment automatically cancel itself, or to have the subsequent deployments adjust their schedule to realign with the original 15-minute interval. I appreciate you mentioning your ideal case scenario, this pattern is something that our team is mulling over to see what UX enhancements can be made
🙌 1
b
Awesome! I did see this too. But it looks like this is for Prefect v1. Do you know of any updated type of script for Prefect v2? https://github.com/PrefectHQ/prefect/discussions/5373