Auto-shutdown cluster with notebook attached

I am teaching a course where the students are using Databricks to become familiar with Spark. I would like to have a cluster that can auto-shutoff whenever it hasn't been used for, say, 1 hour, so that I don't keep paying for the AWS machines during the night, etc. I can turn them off myself, but this does not allow for the flexibility that the students can turn on/off whenever they want without me worrying about skyrocketing costs if they forget to turn it off.

1 Answer

You can use the Databricks cluster Auto Termination to have the cluster terminate after a certain inactivity time. When creating the cluster from the clusters tab, you will see a "Auto Termination" checkbox. If enabled, you can specify the minutes of inactivity. By default this is enabled and set to 60 minutes, so you may not even need to do anything to the cluster you made for your class.