I'm currently working on a custom CakePhp Shell. A cronjob starts the Shell. The Shell executes a worker (task). Simple and easy.
The shell starts a task worker:
$this->WorkerTask->execute();
How to create 10 WorkerTasks in one movement?
Is this legal:
for($i=0; $i<10; $i++){
$this->WorkerTask->execute();
}
or:
for($i=0; $i<10; $i++){
$this->WorkerTask = new WorkerTask();
$this->WorkerTask->execute();
}