Running a php script via crontab
-
Howdy all
I'm trying to run a daily PHP script via cron without success.
I basically have:
55 23 * * * /path/file.phpJust got an email from cron saying "No such file or directory"....which I know isn't the case.
Looking around the net, seems you might have to call PHP bin before you call the file? Also finding different answers for people running php 5.2+...........but none of the chunks of code I've found work (maybe something different for nginx?).
Anyone got any pointers?
Ta
BenPosted 1 year ago # -
Anyone?
Posted 1 year ago # -
Maybe this page will help?
http://www.htmlcenter.com/blog/running-php-scripts-with-cron/
Posted 1 year ago # -
Hi Barnaby
Cheers for that - thats definatly helped.
The script is running, but its throwing this error:
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so: /usr/local/Zend/lib/ZendExtensionManager.so: cannot open shared object file: No such file or directory
The script needs to connect to some encoded files - which are in a different Nginx directory.
Is the path to PHP this still:
/usr/local/bin/php
Getting there!
Ben.Posted 1 year ago # -
I'm using lynx to run php script from command line, i think it is inbuilt in every distribution, it is a linux command line browser.
To run it:
55 23 * * * lynx -dump http://www.yoursite.com/yourscript.phpPosted 1 year ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
