Answers:
该unattended-upgrade
程序是一个python脚本,其相关部分似乎是:
# 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])
因此,支持的时间格式就是所支持的时间格式/sbin/shutdown
,即(from 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.