I tried making a crontab as root to have all of the computers in our labs shutdown at 4:30 everyday.
I first tried doing this through the command line as root, but the shutdown -h now command is not being executed for some reason. I tried doing this with Cronix with the same result.
I did an osascript cron (tell application system events shutdown) and that works, but the problem is that the computer provides a prompt if there is any open application or unsaved document so the computer will not shutdown.
Both of the following do not work. Any ideas? I could not GTFA.
30 16 * * * sudo -u root shutdown -h now
30 16 * * * shutdown -h now
Thanks
I first tried doing this through the command line as root, but the shutdown -h now command is not being executed for some reason. I tried doing this with Cronix with the same result.
I did an osascript cron (tell application system events shutdown) and that works, but the problem is that the computer provides a prompt if there is any open application or unsaved document so the computer will not shutdown.
Both of the following do not work. Any ideas? I could not GTFA.
30 16 * * * sudo -u root shutdown -h now
30 16 * * * shutdown -h now
Thanks





