Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Have you tested with apps known to prevent shutdown, like Photoshop? if it has an open unsaved document it will always demand an answer before it will quit. For most Apple apps & many others this doesn't apply as they willl just restore to the same point at which they quit. Commented Nov 3, 2020 at 12:08
  • I have tested it with atleast third party applications like MS Outlook unsaved draft email, MS Excel unsaved sheet, VS Code Editor and other my daily tools. I am using this line from terminal for several time but haven't tested with Photoshop. We will loose all unsaved data that's for sure with this line. Commented Nov 3, 2020 at 12:32
  • 1
    @Tetsujin From man shutdown: Upon shutdown, all running processes are sent a SIGTERM followed by a SIGKILL. Neither Photoshop nor any other application can protect against a SIGKILL. Commented Nov 3, 2020 at 12:38
  • 2
    In the OP's case, and assuming that a daily reboot is expected to happen anyway, I would just set up a daily cronjob enforcing a shutdown about an hour before the automatic boot-up. Commented Nov 3, 2020 at 12:40
  • 1
    @nohillside A well written app should save its state on a SIGTERM - However not may are Commented Nov 3, 2020 at 14:48