public static function add($method, $directory, $exec_time = Null) { $ent_task = self::getTable()->newEntity(); if (is_null($exec_time)) { new \DateTime('now'); } else { if (!is_string($exec_time)) { $ent_task->exec_time = $exec_time; } else { \DateTime::createFromFormat('HH:ii d-m-Y', $exec_time); } } $ent_task->status = TaskStatus::WAIT; $ent_task->method = $method; $ent_task->directory = $directory; $task = new Task($ent_task); $task->save(); return $task; }
public function geturl($path) { $this->out('Generating link... ', 0, Shell::QUIET); $this->_io->overwrite('Generated link: ' . Task::getUrlBase($path), 1); }
public function image($file) { Task::getUrlBase($this->Url->img($file)); }
public function process() { return Task::tick(); }
public function main($task) { Task::init_and_execute($task); }