August 5th, 2013, 04:55 PM
Cron job failing bad interpreter: No such file or directory
I tried adding to:
It doesn't run.
When I run it in "apache" user's crontab it runs but fails:
/bin/sh: /var/www/mydomain.com/public_html/cgi-bin/cgi-lib/cron.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
August 5th, 2013, 05:13 PM
You saved the file with Windows-style line endings. They need to be Unix-style.
Assuming you have it installed, dos2unix can convert it for you.
# dos2unix -o /var/www/mydomain.com/public_html/cgi-bin/cgi-lib/cron.pl
August 5th, 2013, 06:26 PM
Thanks, that has fixed it