Re: PHP and Cron
| From: | Marko Vukovic' | Date: | Thu, 14 Sep 2000 15:06:33 +0000 |
| Subject: | Re: PHP and Cron | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16790@lists.php.net to get a copy of this message | ||
Adam Charnock wrote:
>
> Hi all. I have written a PHP script that needs to be run as a cron job.
> However, since it does not have a line such as this I am told it will not
> work:
> #!/usr/bin/perl
>
> Has anyone else managed a work around for this problem or is there a good
> solution to it?
>
> Thanks
> Adam Charnock
Is your PHP the CGI version or is it called by the webserver?
If it is the CGI standalone version, you will need a #!/path/to/phpbinary on the first line of your
script.
If not, use lynx to run your script: /usr/local/bin/lynx -dump http://path-to-your-script > /dev/null
This issue has been raised many times before - always check the list archives first.
--
Marko.