Re: [systemd-devel] From command-line 'systemctl suspend' works' from cron it does not

2016-04-01 Thread Cecil Westerhof
2016-04-01 21:34 GMT+02:00 Lennart Poettering : > On Mon, 21.03.16 09:21, Cecil Westerhof (cldwester...@gmail.com) wrote: > > > When executing > > systemctl suspend || echo "Error code: ${?}" > > from the command-line it outputs > > Error code: 1 > > and it puts my

Re: [systemd-devel] From command-line 'systemctl suspend' works' from cron it does not

2016-04-01 Thread Lennart Poettering
On Mon, 21.03.16 09:21, Cecil Westerhof (cldwester...@gmail.com) wrote: > When executing > systemctl suspend || echo "Error code: ${?}" > from the command-line it outputs > Error code: 1 > and it puts my machine in suspend. > > When putting it in cron it gives the following errors: >

Re: [systemd-devel] From command-line 'systemctl suspend' works' from cron it does not

2016-03-24 Thread Cecil Westerhof
2016-03-23 8:11 GMT+01:00 Cecil Westerhof : > Have you tried running from a root > >> crontab? >> > > ​Just tried it and that works. One important difference: it returns an > error code of 0 instead of 1. > So probably I need to setup a systemd session. How am I going to

Re: [systemd-devel] From command-line 'systemctl suspend' works' from cron it does not

2016-03-23 Thread Cecil Westerhof
2016-03-23 1:32 GMT+01:00 Kai Krakow : > Am Mon, 21 Mar 2016 09:21:39 +0100 > schrieb Cecil Westerhof : > > > When executing > > systemctl suspend || echo "Error code: ${?}" > > from the command-line it outputs > > Error code: 1 > > and it

Re: [systemd-devel] From command-line 'systemctl suspend' works' from cron it does not

2016-03-22 Thread Kai Krakow
Am Mon, 21 Mar 2016 09:21:39 +0100 schrieb Cecil Westerhof : > When executing > systemctl suspend || echo "Error code: ${?}" > from the command-line it outputs > Error code: 1 > and it puts my machine in suspend. > > When putting it in cron it gives the following

[systemd-devel] From command-line 'systemctl suspend' works' from cron it does not

2016-03-21 Thread Cecil Westerhof
When executing systemctl suspend || echo "Error code: ${?}" from the command-line it outputs Error code: 1 and it puts my machine in suspend. When putting it in cron it gives the following errors: Failed to execute operation: Access denied Failed to start suspend.target: Access