I’m trying to use cron for automate a script execution. The script will update the EPG data for the live PVR tv. Thie script works properly when I execute manual, but I need to execute automatically, as I will not need to execute every X days manually.
So after install crontab (from the OSMC store and apt-get, I get the same result) I insert the following line in sudo crontab-e
:
17 11 * * * home/osmc/Extras/wg++/update.sh
But the script doesn’t run. If I type service cron status
I get:
* cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled)
Active: active (running) since Mon 2017-04-17 09:46:19 CEST; 1h 51min ago
Docs: man:cron(8)
Main PID: 210 (cron)
CGroup: /system.slice/cron.service
`-210 /usr/sbin/cron -f
So cron seems to be running properly. If I type sudo journalctl _COMM=cron
I get:
-- Logs begin at Mon 2017-04-17 09:46:19 CEST, end at Mon 2017-04-17 11:39:17 CEST. --
Apr 17 09:46:19 osmc cron[210]: (CRON) INFO (pidfile fd = 3)
Apr 17 09:46:19 osmc cron[210]: (CRON) INFO (Running @reboot jobs)
Apr 17 10:11:01 osmc cron[210]: (osmc) RELOAD (crontabs/osmc)
Apr 17 10:11:01 osmc CRON[831]: pam_unix(cron:session): session opened for user osmc by (uid=0)
Apr 17 10:11:01 osmc CRON[832]: (osmc) CMD (home/osmc/Extras/wg++/update.sh)
Apr 17 10:11:01 osmc CRON[831]: (CRON) info (No MTA installed, discarding output)
Apr 17 10:11:01 osmc CRON[831]: pam_unix(cron:session): session closed for user osmc
Apr 17 10:16:01 osmc cron[210]: (osmc) RELOAD (crontabs/osmc)
Apr 17 10:17:01 osmc CRON[871]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 17 10:17:01 osmc CRON[872]: pam_unix(cron:session): session opened for user osmc by (uid=0)
Apr 17 10:17:01 osmc CRON[874]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Apr 17 10:17:01 osmc CRON[873]: (osmc) CMD (home/osmc/Extras/wg++/update.sh)
Apr 17 10:17:02 osmc CRON[871]: pam_unix(cron:session): session closed for user root
Apr 17 11:01:14 osmc cron[1072]: (CRON) DEATH (can't lock /var/run/crond.pid, otherpid may be 210: Resource temporarily unavailable)
Apr 17 11:08:16 osmc cron[1095]: (CRON) DEATH (can't lock /var/run/crond.pid, otherpid may be 210: Resource temporarily unavailable)
Apr 17 11:08:22 osmc cron[1096]: (CRON) DEATH (can't open or create /var/run/crond.pid: Permission denied)
Apr 17 11:13:01 osmc CRON[1173]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 17 11:13:01 osmc CRON[1174]: (root) CMD (home/osmc/Extras/wg++/update.sh)
Apr 17 11:13:01 osmc CRON[1173]: (CRON) info (No MTA installed, discarding output)
Apr 17 11:13:01 osmc CRON[1173]: pam_unix(cron:session): session closed for user root
Apr 17 11:17:01 osmc CRON[1192]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 17 11:17:01 osmc CRON[1193]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Can anyone help me to locate what I’m doing wrong? Thanks!