Scheduled downtime.

My IT department will be doing some maintenance this weekend and so I’ll need to make sure that all jobs are suspended and slaves are safely shut down. I’ve checked both the Slave Scheduling and Power Management sections, but I can’t find anything that allows me to do these tasks at a specific time. Does Deadline even offer this ability?

Deadline doesn’t offer the ability to power down the farm at a set time, but there is no reason you can’t write a script that does it for you. And the run that script at the correct time.

Grabbing every slave on the farm with GetSlaveNames, massaging the slave names into the machine names and running RemoteControl [machine names] OnLastTaskComplete ShutdownMachine to set them all to shutdown after they finish their last task. The issue is that you don’t know if they’ll be shut down in time, so as a last ditch you could send another RemoteControl with ShutdownMachine instead. That will not wait.

All of this is available through deadlinecommand, whose help file is available with the --help flag. Its a big one.

Let me know if you have more questions about this.

Thanks Justin. I’m not sure I’ll have time to write a script for this maintenance tonight. But I’ll probably take some time next week to do this for our next maintenance. Thanks for the tips, I’ll certainly ping you if I have questions. :slight_smile:

I was thinking if I get a chance I’ll build this script and put it up on the public github (github.com/ThinkboxSoftware/Deadline) as it seems like it would be very useful to other admins.

But that’s only if I get a chance!

Haha! Let’s see who gets time first. :wink:

As a stop-gap for tonight, you can set up some idle shutdown stuff in Power Management. If you also set up Slave scheduling to ensure your slaves don’t shut down during the weekday you’d be groovy.

If you aren’t using power management stuff you might want to look into it, if only for power saving.

So I actually did figure out a way to accomplish what I need without scripting. In the Slave Scheduling, you set a stop time for a certain day. I just ran a test and it worked just fine. So I can have them all shut down tonight at 10 pm so IT can safely shut down the farm at 12.

Yeah, that’ll do it. I might still make the script, if only to have it as an extra tool in the kit.