Hello,
I run systemd on a NAS without internal-clock-holding battery, so I think
that
the systemd-timesyncd sets the time to the last known value after restart
and
syncs it from the network when on-line. Is it right?

Now, I have a shutdown timer unit, which powers the NAS off at the given
time.
However, sometimes (about 50% of cases), when the device is powered-on, it
switches off immediately. When switched-on again, it boots as expected.

The question is, is there a way of fixing this issue? I have tried to add
sleep
to skip to the next minute (ExecStart should be triggered one after
another), but unsuccessfully.

Thank you,
DT


Here are the unit files.
timer:

[Unit]
Description=Poweroff the system on scheduled time

[Timer]
# Power off at the given time
OnCalendar=Mon,Tue,Wed,Thu,Fri *-*-* 01:10:00
OnCalendar=Sat,Sun             *-*-* 01:55:00

[Install]
WantedBy=timers.target

---
service:

[Unit]
Description=Poweroff the system

[Service]
Type=oneshot
ExecStart=/bin/sleep 80
ExecStart=/usr/bin/systemctl poweroff
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to