Back to TasksListCommand class

Method getTasks

private array
getTasks
()
Returns a stdClass object array of scheduled tasks.
Returns
  • array
Since
  • 4.1.0
-
  • \RunTimeException

Method getTasks - Source code

/**
 * Returns a stdClass object array of scheduled tasks.
 *
 * @return array
 *
 * @since 4.1.0
 * @throws \RunTimeException
 */
private function getTasks() : array
{
    $scheduler = new Scheduler();
    return $scheduler->fetchTaskRecords(['state' => '*'], ['ordering' => 'a.title', 'select' => 'a.id, a.title, a.type, a.state, a.next_execution']);
}