Delaying Systemd Reboot For A While
Hi,
I’m in need of rebooting a server 1 minute after I give the command. I’m used to
shutdown -r +1
which works as advertised. Now that shutdown is part of systemd
that I can also use
systemctl reboot
But I can’t find a way to provide a time specification in this latter form. What’s the correct incantation?
TIA, Carlos.
5 thoughts on - Delaying Systemd Reboot For A While
Hello Carlos, You can try the ‘at’ command to achieve the same result. Regards,
-Martín CentOS mailing list CentOS@CentOS.org http://lists.CentOS.org/mailman/listinfo/CentOS
or ‘sleep’
Hi,
Well, even though both could work, I fiinally went with the ‘at’ route, which goes wonderfully with the configuration management system I’m using
<http://www.ansible.com/home>.
Thanks a lot!
Have you tried this? It’s a symlink, but systemctl knows to act differently when called as shutdown, and the traditional use still works. No need to hack around anything — just use ‘shutdown -r’ as always. In Fedora at least, note that +1 is actually the _default_ — I think that’s true in EL7 as well but I don’t have a system handy to check. See `man shutdown` for more.
And `man systemd.time` for the time formats.
—
Matthew Miller
Fedora Project Leader
Oh, yes! Both reboot and shutdown work as usual. I just wanted to know if there was a one-to-one mapping to the systemctl version.
Thanks a lot, Carlos.