Hi,
I'm trying to autostart a VM every 5 min in case my users accidentally shut down it.
I added a line "qm start 900" by editing crontab but it doesn't work.
When I type "systemctl status cron", it seems it's calling the "qm start" command, but the session closes everytime.
There are some info noticing that cronjob requires full path for a certain command.
Is there any idea solving this?
Mar 12 20:00:01 test CRON[8146]: pam_unix(cron:session): session opened for user root(uid=>
Mar 12 20:00:01 test CRON[8147]: (root) CMD (qm start 900)
Mar 12 20:00:01 test CRON[8146]: pam_unix(cron:session): session closed for user root
Mar 12 20:05:01 test CRON[8959]: pam_unix(cron:session): session opened for user root(uid=>
Mar 12 20:05:01 test CRON[8960]: (root) CMD (sudo qm start 900)
Mar 12 20:05:01 test CRON[8959]: pam_unix(cron:session): session closed for user root
I'm trying to autostart a VM every 5 min in case my users accidentally shut down it.
I added a line "qm start 900" by editing crontab but it doesn't work.
When I type "systemctl status cron", it seems it's calling the "qm start" command, but the session closes everytime.
There are some info noticing that cronjob requires full path for a certain command.
Is there any idea solving this?
Mar 12 20:00:01 test CRON[8146]: pam_unix(cron:session): session opened for user root(uid=>
Mar 12 20:00:01 test CRON[8147]: (root) CMD (qm start 900)
Mar 12 20:00:01 test CRON[8146]: pam_unix(cron:session): session closed for user root
Mar 12 20:05:01 test CRON[8959]: pam_unix(cron:session): session opened for user root(uid=>
Mar 12 20:05:01 test CRON[8960]: (root) CMD (sudo qm start 900)
Mar 12 20:05:01 test CRON[8959]: pam_unix(cron:session): session closed for user root