Skip to main content
Solved

Force Lab Shutdown

  • October 26, 2015
  • 8 replies
  • 26 views

Forum|alt.badge.img+10

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

Best answer by Aziz

Take a look at this thread, same issue.

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

8 replies

Forum|alt.badge.img+1
  • New Contributor
  • October 26, 2015

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.


Forum|alt.badge.img+14
  • Contributor
  • Answer
  • October 26, 2015

Take a look at this thread, same issue.

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


Forum|alt.badge.img+1
  • New Contributor
  • October 26, 2015

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


thomasC
Forum|alt.badge.img+10
  • Contributor
  • October 26, 2015

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
Forum|alt.badge.img+38
  • Hall of Fame
  • October 26, 2015

@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
Forum|alt.badge.img+10
  • Contributor
  • October 26, 2015

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


Forum|alt.badge.img+13
  • Honored Contributor
  • October 26, 2015

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)


Forum|alt.badge.img+16
  • Valued Contributor
  • October 26, 2015

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.