Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Allow client to cancel scheduled reboot

I am scheduling a task to run some maintenance scripts and then reboot. I would like to have a warning popup on the client giving them the option to cancel before restarting their computer. If they didn't respond within a specified amount of time, the scripts would run and the computer would reboot. Any suggestions?

Mac Pro, Mac OS X (10.7.3)

Posted on Jul 10, 2012 8:53 AM

Reply
1 reply

Jul 14, 2012 6:40 PM in response to chuckadile

Have you tried applescript? There a command line tool to trigure an applescript. You could use a command like.


try

with timeout of 2 seconds

tell application "Finder"

set answer to display dialog "This computer is about to be rebooted" buttons {"Reboot", "Cancel Reboot"}

end tell

end timeout

on error

set answer to {button returned:"Cancel Reboot"}

end try


and then pipe the results into an if then command.

Allow client to cancel scheduled reboot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.