I have this cronjob set :
* * * * * /usr/bin/systemctl suspend
And it is not working. But I can run it in a shell and it works. I don't understand what could be not working.
Redirecting error output to
/tmp/error gives this :
Failed to issue method call: Access denied Failed to issue method call: Access denied
My question is then : Are cronjobs run as a special user (
cron for example), which would explain that my user can run the command, but not
Additional explanation :
This is a minimal example to show a problem I have in a script (that makes more sense than the single command provided here)
systemctlis part of
systemd. I think reboot, shutdown, suspend are working with a non-root user with
systemd. Anyway, it is working on my system.
Finally, I use Arch Linux and
/sbinare all symlinks to