I'm trying to reboot my server with cron job. I added below line
35 14 * * * root shutdown -r now
But nothing happens. I shared journalctl log at below
>Feb 15 14:35:01 example CRON[2840]: pam_unix(cron:session): session opened for user root by (uid=0)
>Feb 15 14:35:01 example CRON[2848]: (root) CMD (root /sbin/shutdown -r now)
>Feb 15 14:35:01 example CRON[2840]: pam_unix(cron:session): session closed for user root
Note: I tried both shutdown and /sbin/shutdown. But still same.
How do I fix this ?
/etc/crontaband regular user-crontab formats – steeldriver Feb 15 '19 at 15:03crontab -ethen added above line, then I restart the service withsystemctl restart cron@steeldriver – Hasan Tıngır Feb 15 '19 at 15:08