我正在尝试使用命令从 cron 休眠systemctl hibernate。但是,我收到以下错误:
Failed to set wall message, ignoring: Interactive authentication required.
Failed to hibernate system via logind: Interactive authentication required.
Failed to start hibernate.target: Interactive authentication required.
See system logs and 'systemctl status hibernate.target' for details.
Run Code Online (Sandbox Code Playgroud)
如果我从终端手动执行上述命令,它会按预期工作。
如何从 cron 休眠?
我使用的是 Ubuntu 16.04。