Trying to get php to run on cron -
this driving me little insane, , i've gone through hundered different things without touching on solution; may miss out on details on i've done far.
i'm trying cron job run on linux server ive got running in datacentre. i'm trying run simple php script in format:
* * * * * php -q /path/to/script/file.php
the php part runs fine if type in manually, nothing happens when cron runs; appears run in logs fine, no errors.
if go , edit crontab -e, , put in line
* * * * * echo "test" > /tmp/test.txt
that seems work ok, creates text file.
has had problems running php script in format?
(btw i'm testing run every minute, doesnt work @ time.)
any appreciated.
try invoking php it's full path, example /usr/bin/php
the cron not have same environment variables user profile have, might not find executable.
Comments
Post a Comment