Exec format error (in cron)
and forget to include the shell command at the top of your scripts. This usually isn't a problem, but in certain cases (where
the shell isn't set, or doesn't exist yet) it will cause problems. So, even if your script is set to be executable (chmod +x
), you'll receive an error like:
Exec format error
Just such a case manifests itself when using a script through cron (and run-parts). To remedy this problem put the following at the beginning of the script:
That way, the system will know what to use when executing the script.