Pre-Package Proposal: System_Batch / System_Schedule
| From: | Alex Hayes | Date: | Fri, 25 Jul 2003 05:52:22 +0000 |
| Subject: | Pre-Package Proposal: System_Batch / System_Schedule | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-18668@lists.php.net to get a copy of this message | ||
Hello All,
If something like this exists, then please let me know as ive been looking
around for several hours now...
I need to be able to schedule unix style 'at' jobs from within php, and so
was considering making a package that could do this (unless one already
exists...)
I would hope that using the base Batch class we can manage different types
of scheduled tasks, ie... cron, at, batch etc... and would also hope that
windows utilities could be built as well (although not being familiar with
windows i wouldn't be writing these....)
At the moment i see the at components scheduling working as follows...
1. The instance is supplied with jobs and the time to go out in an array or
text based string.
2. a temporary file is built so that we can use the -f 'at' option.
3. A pear System_Command call is made to the at command and specifying
the -f arg to the temporary file created.
It would also provide methods for viewing the current queues etc...
There are a few problems that I can see that could become of this however.
The job would be registered as whatever user php was running as (i believe),
and obviously some systems do not allow certain users access to creating at
/ cron jobs etc...
So, will anyone else have any use for this kind of package? or has someone
else already built something to manage this.
cheers
alex