O programa unattended-upgrade
é um script python, cuja parte relevante parece ser:
# reboot at the specified time
when = apt_pkg.config.find(
"Unattended-Upgrade::Automatic-Reboot-Time", "now")
if shutdown_lock > 0:
os.close(shutdown_lock)
logging.warning("Found %s, rebooting" % REBOOT_REQUIRED_FILE)
subprocess.call(["/sbin/shutdown", "-r", when])
Portanto, os formatos de hora suportados são aqueles suportados por /sbin/shutdown
, a saber (de man shutdown
):
The time string may either be in the format "hh:mm" for hour/minutes
specifying the time to execute the shutdown at, specified in 24h clock
format. Alternatively it may be in the syntax "+m" referring to the
specified number of minutes m from now. "now" is an alias for "+0",
i.e. for triggering an immediate shutdown. If no time argument is
specified, "+1" is implied.