Runs active tasks if current time matches with time expression
public static checkAndRunTasks ( array $tasks ) | ||
$tasks | array |
public function testCheckAndRunTasks() { $task_inactive = TaskMock::createNew(); $task = TaskMock::createNew(); $task->setStatus(TaskInterface::TASK_STATUS_ACTIVE); $task->setTime('* * * * *'); TaskRunner::checkAndRunTasks(array($task, $task_inactive)); }
public function actionCheckTasks() { TaskRunner::checkAndRunTasks(Task::getAll()); }
public function checkTasks() { TaskRunner::checkAndRunTasks($this->task->getAll()); }