Score:0

everyday autoshutdown at given time

cn flag

Hey guys how could I autoshutdown Ubuntu 20.04 everyday at given time? The pc (sambaserver) is already starting automatically in the morning (bios) but should autoshutdown in the night.

waltinator avatar
it flag
Read `man shutdown pm-is-supported-`. Read `man -a crontab` and `more /etc/crontab`. `root`'s `crontab` has an additional field! Alternatively, read `man sudo sudoers`, and grant your user `NOPASSWD` access to just the `shutdown` command, and invoke it from your user `crontab`.
cn flag
Ok, I tried this:
cn flag
Ok, I tried this: sudo crontab -e than 0 19 * * * root shutdown -P for shutdown at 7pm but it does not work, this is the path for crontab /tmp/crontab.ooiVsB/crontab and I saved it to /etc/crontab as well but without success. Any Ideas?
cn flag
hey the path was missing, so the correct crontab entry is 0 19 * * * root /sbin/shutdown -P, Thanks @waltinator
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.