-
Notifications
You must be signed in to change notification settings - Fork 2
Task dependencies
mtwebit edited this page Jul 6, 2018
·
2 revisions
You can specify execution dependencies between tasks.
Simply add a 'dep' field to $taskData when creating the task:
$taskData['dep'] = $othertask;
$task = $tasker->createTask($class, $method, $page, 'This task depends on '.$othertask->title, $taskData);or add a dependency later on:
$tasker->addDependency($task, $otherTask);Dependencies are automatically handled by Tasker. You cannot activate a task when they are not met.
It is also possible to specify follow-up tasks that will be activated when the task is finished.
$tasker->addNextTask($task, $nextTask);Follow-up tasks (IDs) are stored in $taskData['next_task'].