RE: [PHP] activating php scripts via cron
| From: | Jay Blanchard | Date: | Tue, 16 Jul 2002 12:48:23 +0000 |
| Subject: | RE: [PHP] activating php scripts via cron | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107848@lists.php.net to get a copy of this message | ||
[snip]
I am wondering if it would be possible to activate a php script via cron
periodicly.
Can anybody give me a hint on that or knows a good article?
[/snip]
If you can run PHP from the command line, i.e.
php thisscript.php
it means that you have installed PHP as a standalone executable. If so you
can include the following bash line in your PHP script (as the first line,
just like PERL, or any other shell script);
#!/path/to/php
Then you can set up your CRON to call the script directly. You can compile
PHP as a standalone quite easily, if you compiled it before it should only
take you a few minutes.
HTH!
Jay
"Before you criticize someone, walk a mile in his shoes. That way, if he
gets angry, hell be a mile away-and barefoot"
*************************************
* Want to meet other PHP developers *
* in your area? Check out: *
* http://php.meetup.com/ *
* No developer is an island ... *
*************************************