Force Lab Shutdown

jgwatson
Contributor

I'm trying to execute a profile where all of the Macs (15) in our lab, shutdown at 3pm everyday. I have created the profile under Energy Saver to do this, but it isn't working. Before 3pm everyday, all of the Macs go into sleep mode.

I need this because we have dirty power coming into the school at night, and random rooms experience brown outs - I'm not too sure when the power issue will be fixed.

Plus we have (hopefully) El Nino showing up soon, and if we get even the smallest of rain showers, everything starts to trip.

Thanks

1 ACCEPTED SOLUTION

Aziz
Valued Contributor

Take a look at this thread, same issue.

https://jamfnation.jamfsoftware.com/discussion.html?id=17113

View solution in original post

8 REPLIES 8

amiller6
New Contributor

I have been looking into this for a while now. It is my belief that the built-in power management isn't sufficient to do what you need to do. I've noticed that if a user stays logged in, it won't shut down. I'm looking into a launch daemon with a script to force shutdown. I'm curious what other people are doing.

Aziz
Valued Contributor

Take a look at this thread, same issue.

https://jamfnation.jamfsoftware.com/discussion.html?id=17113

amiller6
New Contributor

I knew I was on the right track! Somehow I missed that discussion. Thanks!

thomasC
Contributor

You could use pmset via command or script. There is a handy tool that was once part of the JAMF resource kit now available here PM Script Builder that makes this easier if you are not familiar with pmset. You can schedule shut down and startup as needed. Use a policy to apply the script created with PM Script Builder.

stevewood
Honored Contributor II
Honored Contributor II

@thomasC problem with pmset is the same problem you'll run into with the Config Profile method: if an app is left open that cannot quit, the machine will not shutdown. The only solution, AFAIK, is to use what @Abdiaziz pointed to, and that is a LaunchDaemon that forces the shutdown.

thomasC
Contributor

@stevewood missed that part. True can't shutdown with open apps. I guess a launchd that issues a halt.

Nix4Life
Valued Contributor

hey Guys;

just finished setting this up with caffeinate and a LaunchDaemon shutdown/update script, as @Abdiaziz and @stevewood mentioned.Has been working for the past 3 weeks

LSinNY
(damnyankee-slack)

Look
Valued Contributor III

Can you not have one policy that uses pmset to schedule a wake for any machines that are still on but asleep and then have a normal Casper time restricted policy with an appropriate time window that has a script that runs something like.

shutdown -h now

Perhaps set it to available offline so it works even whent he JSS is unavailable.