RunpodR
Runpod16mo ago
cyberzen

Automatically shut down pod after being idle for X mins

Hi guys, a general question: I'd like to automatically shut down my pod after being idle for 30 mins (so I can complete several trainings overnight). I've found this command bash -c "nohup sleep 2h; runpodctl stop pod $RUNPOD_POD_ID" & but the thing is that I have to pre-define after which period the pod gets shut down. Is there any functionality that automatically monitors the pod's status and shuts it down after being idle for X mins?
Was this page helpful?