An Apache Spark-based analytics platform optimized for Azure.
Hi
Thank you for posting query in Microsoft Q&A Platform.
It seems like you have a question about scheduling notebooks in Azure DevOps and how to avoid running the same notebook multiple times if it takes longer than expected to complete.
One way to achieve this is by using a locking mechanism to prevent multiple instances of the same notebook from running simultaneously. You can use a file or a database table as a lock to ensure that only one instance of the notebook is running at a time.
Here's an example of how you can implement this:
At the beginning of the notebook, check if the lock file or database table exists. If it does, exit the notebook. If it doesn't, create the lock file or insert a record into the database table.
At the end of the notebook, delete the lock file or delete the record from the database table.
This way, if the notebook is already running, the second instance will exit immediately without doing anything. Once the first instance completes, the lock will be released and the next scheduled instance of the notebook will be able to run.
I hope this helps! Let me know if you have any further questions.
Please consider hitting Accept Answer button. Accepted answers help community as well. Thank you.