I have a php script designed to be run via command line / cron. It runs just fine via the command line. But if I run it via cron I get '/bin/sh: php: command not found' mailed to me... Do I simply need to find and include the path to PHP in the crontab, or is it more complicated than that?
Just make sure the shebang (#!) line has the full path to PHP (since cron has a very minimal ENV).
or put the full path in the crontab; like:* * * * * /usr/local/bin/php /path/to/script
Thank you it worked course I forgot to add the -q but that's easy to fix