RE: [PHP] Cron Jobs and php as apache module
| From: | Thijs Lensselink | Date: | Wed, 17 Mar 2004 11:17:00 +0000 |
| Subject: | RE: [PHP] Cron Jobs and php as apache module | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-180667@lists.php.net to get a copy of this message | ||
Daryl Meese wrote on woensdag 17 maart 2004 12:04:
> Hello all,
>
> Ok, I run php as an apache module but need to have some php scripts
> called from a cron. Since you can't have php installed as a cgi &
> apache module I don't know how to do this.
>
> Any help would be appreciated.
>
> TIA
>
> Daryl Meese
With php installed as an apache module you can still
run php-scripts from commandline. It should work.
If i create the following file:
test.php
<?
#!/usr/local/bin/php
mail("some@email.address", "Sample", "testing cronjob");
?>
And create a new cronjob:
crontab
30 * * * * php /path to/test.php
This will make cron run the script.
Just tested it and it works.
Thijs