I've a webserver with several sites and I'm trying to run a script by crontab but it gives me a error (126 and 127)
My script is in:
When I run the command:
The script work as normal.
I've created a script.sh that contains
If I run
sh script.sh Works
In crontab, I've entered this:
35 13 * * * /var/www/site1/script.sh
And I get this in syslog
Apr 12 13:35:01 webserver /USR/SBIN/CRON: (root) CMD (/var/www/site1/script.sh)
Apr 12 13:35:01 webserver /USR/SBIN/CRON: (CRON) error (grandchild #13331 failed with exit status 126)
What am I doing wrong?