0

I have a cron:

* * * * * /usr/local/bin/script 2>/tmp/cron.log

And the script:

#!/bin/bash
if <some validation>; then
    systemctl suspend
fi

So I get the error when cron executed:

Call to Suspend failed: Interactive authentication required.

Someone have a tip for this? How can I do this works?

MC68020
  • 7,981
rhuanpk
  • 415

0 Answers0