The application cancelled restart

Hi, I am creating an OF application for an interactive installation that is scheduled to run for a number of years. I would like to be able to schedule a computer restart using OSX power management scheduler, but when I attempt to restart the computer while the OF app is running, I get the error message: “The application cancelled restart.” and the restart fails.

Why doesn’t the OF app quite upon computer shut down like other apps do?
Any workaround for this?

Thanks.

Sure that there is a cleaner method… but you can make an script and calling it, in the script you can kill the of app and later shutdown or restart or whatever

I was able to find another application that handles scheduled restarts without this problem. It’s called ibeez:

http://www.ibeezz.com/

i am on elCapitan and my OF app prevents the scheduled Shutdown or Restart, which is set in system preferences -> energy saver -> schedule

on shutdown time i get " the application X canceled shut down "

so i wrote this little app that checks “/Library/Preferences/SystemConfiguration/com.apple.AutoWake.plist”;