You are not logged in.
Here's my crontab
8 2 * * * rtcwake -u -s 0 -m no >/dev/null 2>&1
10 2 * * * ROOT /usr/sbin/shutdown -h nowNot sure why it didn't work.
The Dell laptop I have doesn't pass power through unless the machine is active or in a suspended state.
Offline
I tried this
30 21 * * * sudo rtcwake -u -s 60 -m off >/dev/null 2>&1
It was supposed to wake my laptop up, then turn it off after 60 seconds. It didn't. Full confession, I copied the command assuming it'd work. I have no idea what >/dev/null 2>&1 is or if I even need it
Edit. There is a file in /dev/ called null, but it's blank. Not sure what that means
Last edited by MarkW (Yesterday 20:48:43)
Offline
>/dev/null 2>&1 is a command used to redirect both standard output and standard error of a command to a special file called /dev/null, discarding all output and error messages. Useful for running commands quietly - like cron jobs - without displaying any output in the terminal.
You must unlearn what you have learned.
-- yoda
Offline
That makes sense. What doesn't is why the job didn't work. It should have worked unless there's something wrong with my syntax (and I did check the rtcwake manpage)
Offline
Try with "root" instead of "ROOT"
Also try it with "systemctl poweroff" to power off the computer.
Use the full path to systemctl
You must unlearn what you have learned.
-- yoda
Offline
The problem I'm having is with the waking up part. For some reason cron doesn't work when the machine is suspended. And it has to be suspended since I want power to pass through but I don't want it just going normally when I'm not using it.
I can't get rtcwake to actually wake it up from suspend. So what am I doing wrong?
Tutorials aren't helping.
Offline