<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">When executing<br> systemctl suspend || echo "Error code: ${?}"<br></div><div class="gmail_default" style="font-family:courier new,monospace">from the command-line it outputs<br></div><div class="gmail_default" style="font-family:courier new,monospace"> Error code: 1<br></div><div class="gmail_default" style="font-family:courier new,monospace">and it puts my machine in suspend.<br><br></div><div class="gmail_default" style="font-family:courier new,monospace">When putting it in cron it gives the following errors:<br> Failed to execute operation: Access denied<br> Failed to start suspend.target: Access denied<br>and gives the output:<br> Error code: 4<br><br></div><div class="gmail_default" style="font-family:courier new,monospace">What is happening here? Is it possible to run 'systemctl suspend' from cron, or is there a reason why this is not possible?<br clear="all"></div><br>-- <br><div class="gmail_signature">Cecil Westerhof</div>
</div>