scheduling jobs for php

From: Date: Mon, 01 Jan 2001 20:39:07 +0000
Subject: scheduling jobs for php
Groups: php.dev 
Request: Send a blank email to php-dev+get-42704@lists.php.net to get a copy of this message
Hello, Any help you could offer would be greatly appreciated here. In a nutshell: - how can I run a PHP script from the command line when PHP is installed as an Apache module, so that I can execute it using cron? - is there any better way to solve the problem of executing a PHP script as a scheduled task? Here's the long version: I would like to schedule some tasks to be run at some time in the future either once or on a recurring basis. Furthermore, I would like these tasks to be defined in a PHP script, so that I can leverage other PHP code, and avoid code redundancies and inconsistencies. The problem is that the only way I know how to schedule tasks is with cron or at, and using those tools, I wouldn't know how to run a PHP script (unless I install PHP as a CGI program instead of an Apache module) other than calling a separate program that simulates a browser calling up a page. But that still doesn't solve the problem, because that would mean that anyone could call up the page to run this script, and I only want the system to be able to run the script at the specified time(s). Any suggestions on how to do this (using PHP as an Apache module), either with existing PHP functionality, or by extending PHP's functionality? I'd be happy to write an extension for this if necessary, but I'd need some guidance on the best way to implement it. Thanks, and happy New Year! -Matt

« previous php.dev (#42704) next »