cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to restart Databricks Cluster at specific time?

Trushna
New Contributor II

Command available for restart but not at specific time.

databricks clusters restart --cluster-id <>

3 REPLIES 3

Prabakar
Esteemed Contributor III
Esteemed Contributor III

Hi @Trushna Khatri​ , I dont see an option to restart the cluster at a specific time. However, you can achieve this by scheduling a cron job in your terminal. By this, you can set the time to restart your cluster from cli.

The below cron job will restart the cluster daily at 00:00 hrs (mid-night)

0 0 * * * databricks clusters restart --cluster-id 1234-567890-batch123

karthik_p
Esteemed Contributor

@Trushna Khatri​ adding some more information to prabakar. can you please let me know what is actual need of starting cluster during specific time. usually if you criteria is to use for jobs go with job cluster. here cluster start when ever your job start and stops when ever you job gets completed

Trushna
New Contributor II

Actually few pipelines are failed and there is some GC issue. right now manually restart the cluster so need to automate the restart cluster at 8 PM daily. Main thing is as per data coming continuously we cant stop and then start the cluster as we have 30 mins window time

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.