dave420 wrote:PHP is a language, and the PHP software is an interpreter. The interpreter can't just gain consciousness and start running bits of code all on its own - it has to be called by something else. If you want PHP to run at a certain time, something has to run PHP at a certain time. PHP code can't just run itself. Neither can perl, java, C, C++ or anything else. Your gripe seems to be with a lack of cross-platform admin-less scheduling software, not a shortcoming with PHP.
Argh.
Third time I'll try to explain the concept to you.
Apache runs as a daemon. Mod_PHP is a module, that Apache can call.
Now, someone accesses a script - a PHP script - which Apache sees, and loads Mod_PHP to process it. No "gaining conscience" needed.
The script contains a command. Lets call it schedule_task(). Schedule_task in turn tells APACHE to - at specific times - use mod_php to process particular scripts, processes, commands, what have you.
Apache runs as a daemon, so it can check a command stack at regular intervals (its not event-driven). The command stack can be as simple as "there is something on the stack, refer to mod_php". mod_php in turn can hold a command stack as simple as "check with script.php". script.php could then hold the scheduled commands.
None of that is a tremendous change from their current operating manner - and none of it is possible today in PHP, which is what the poster asked for.
Please stop attacking me for answering (from experience, and from a genuine need) what the poster asked.
He asked what PHP doesnt have, but could use. I answered. There is no cross-platform solution to this problem, and there could be by modifying PHP (and possibly, slighly, Apache).