jvanv8
29th August 2006, 10:57 AM
I tried to run a simple cron from a custom script by entering the script in the "Command" section under the "Crontab Tasks"
My script was as follows:
ls As you can see, I just wanted to see if it worked. I got an email with the error message:line 1:
ls
: command not found
So I saw that some people start their scripts with some stuff at the beginning called "shebang"(?) I think. Anyway, I changed my script to this:
#!/bin/sh
ls
When this was run, I get the email:/bin/sh: /home/httpd/vhosts/mydomain.com/httpdocs/cronjobs/my_cron: /bin/sh
ls
: bad interpreter: No such file or directoryWhat the heck? How can I fix this script so it works with Plesk?
My script was as follows:
ls As you can see, I just wanted to see if it worked. I got an email with the error message:line 1:
ls
: command not found
So I saw that some people start their scripts with some stuff at the beginning called "shebang"(?) I think. Anyway, I changed my script to this:
#!/bin/sh
ls
When this was run, I get the email:/bin/sh: /home/httpd/vhosts/mydomain.com/httpdocs/cronjobs/my_cron: /bin/sh
ls
: bad interpreter: No such file or directoryWhat the heck? How can I fix this script so it works with Plesk?