My cron job/script fails.
I'm running mythbuntu 14.04. With previous version of Mythbuntu I have a problem, any help would be greatly appreciated!
I set up cron.daily
with:
$ ls -la /etc/cron.daily
-rwxr-xr-x 1 root root 183 May 12 18:00 mc2xmlUpdate
$ cat mc2xmlUpdate
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin;/home/username
# m h dom mon dow user command
36 17 * * * root /home/username/mc2xml/update.sh
File update.sh
:
#!/bin/sh
/home/username/mc2xml/mc2xml
/usr/bin/mythfilldatabase --refresh all --file --sourceid 1 --xmlfile /home/username/mc2xml/xmltv.xml
cp /home/username/mc2xml/xmltv.xml /media/sdc1/DataShare/
I'm getting a Exec format error
when I run:
$ run-parts -v /etc/cron.daily
run-parts: executing /etc/cron.daily/mc2xmlUpdate
run-parts: failed to exec /etc/cron.daily/mc2xmlUpdate: Exec format error
run-parts: /etc/cron.daily/mc2xmlUpdate exited with return code 1
Files in cron.{daily,hourly,weekly...}
are not in the crontab
format, but scripts or executables that are directly executed. Files in cron.d
are in the crontab
format. Either:
mc2xmlUpdate
to /etc/cron.d
, or/home/username/mc2xml/update.sh
to cron.daily
Also, your PATH
specification contains a ;
instead of a :
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments