yes, you are not creating the file systemd-reboot.timer with ‘nano’ for some reason.
Oh wow, my mistake … sorry you need to hit CTRL-O to write the file, and CTRL-X to exit back to command line. I’m going to go back and edit my original post for the sake of clarity for people following afterwards.
Took a few goes… but hopefully it’s working - is there any way of checking that it’s actually doing the job? Will this: cat /etc/systemd/system/systemd-reboot.timer
but what I am realy wondering is, after I enable the code and want to start the code the following message comes up:
volumio@volumio-bad:~$ sudo systemctl start /etc/systemd/system/systemd-reboot.timer
Failed to start etc-systemd-system-systemd\x2dreboot.timer.mount: Unit etc-systemd-system-systemd\x2dreboot.timer.mount failed to load: No such file or directory.
On the end it works but I can not trace why? Do you have an idea?
Kind regards Korniman
Once you have enabled the file ok, it will automatically start after a reboot. You can see if it is running successfully by typing ‘sudo systemctl status systemd-reboot.timer’.
volumio@volumiostudy:~$ sudo systemctl status systemd-reboot.timer
● systemd-reboot.timer - Reboot daily at 1am
Loaded: loaded (/etc/systemd/system/systemd-reboot.timer; disabled; vendor preset: enabled)
Active: active (waiting) since Mon 2021-04-19 06:38:59 UTC; 17s ago
Trigger: Tue 2021-04-20 01:00:00 UTC; 18h left
Apr 19 06:38:59 volumiostudy systemd[1]: Started Reboot daily at 1am.
So to summarise:
sudo systemctl enable timerfile start timer automatically after a reboot.
sudo systemctl start timerfile start timer immediately
sudo systemctl stop timerfile stop timer immediately
sudo systemctl restart timerfile restart timer if it is already running
sudo systemctl status timerfile shows status of the timer
As the reboot function work at night perfectly and the check of typos was without results, it seems maybe only the feedback by the code is wrong depending on my raspi system. On my installation I add a real time clock as an small IC connected to the Gpios: “Adafruit DS3231 Precision RTC Breakout” and the reboot code receives not the write feedback as software clock is deactivated
Failed to start etc-systemd-system-systemd\x2dreboot.timer.mount:
Unit etc-systemd-system-systemd\x2dreboot.timer.mount failed to load: No such file or directory.
Is this something to do with your RTC? Where has the x2drereboot.timer.mount file come from?
“etc-systemd-system-systemd\x2dreboot.timer.mount” has an invalid backslash in it (but it looks remarkedly similar to the normal systemd path and file of “/etc/systemd/system/systemd-reboot.timer”
You’re exactly right @gvolt, thank you for the correction. No idea why I did it. I’m not going to go back and change each post, because it loses context for someone following the topic chronologically, so I will just add a link at the end of the two incorrect posts pointing here.
My sincere apologies for my mistake in including the path to the timer file when the timer is started/stopped/enabled … you just use the timer filename. (However, you do still need to use the full path when creating the file with ‘nano’.)