Cron script Exec format error

BobcatJoe

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
muru

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:

  • Move mc2xmlUpdate to /etc/cron.d, or
  • Copy/link /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.

edited at
0

Comments

0 comments
Login to comment

Related

Cron.daily Exec format error

Docker Exec format error

systemd Exec format error

fish shell : exec format error

Exec Format Error Eclipse CDT

zsh: exec format error: rvm

Error with CRON executing PHP script

KSH shell script zip command not working correctly: eval: zip: cannot execute [Exec format error]

docker buildx "exec user process caused: exec format error"

OSError: [Errno 8] Exec format error selenium

Dockerfile RUN command return an exec format error

Subprocess: "Exec format error" in gekko package

Cron job to run python script raises error

Where error happened? exec(compile(script,"<string>",'exec'))

sudo throw error cannot execute binary file exec format error

docker run [9] System error: exec format error

System error: exec format error when I start a docker container

php scripts get 'exec format error' or 'permission error'

npm run script error: Failed to exec generateservertestreport script

docker exec is not working in cron

Docker error: standard_init_linux.go:228: exec user process caused: exec format error

Docker Error: standard_init_linux.go:195: exec user process caused "exec format error"

exec format error when running AWS Golang Lambda

Python Selenium chromedriver OSError: [Errno 8] Exec format error

Exec format Error while running dockerised Hello world python example

"docker-compose build" returning "exec format error"

All DKMS-managed modules fail with `Exec format error`

-bash: ./geth: cannot execute binary file: Exec format error

-bash: ./a.out: cannot execute binary file: Exec format error