totalSteps = 1; return QueuedJob::QUEUED; } public function process() { $this->queueNextRun(); $task = new ContentReviewEmails(); $task->run(new HTTPRequest("GET", "/dev/tasks/ContentReviewEmails")); $this->currentStep = 1; $this->isComplete = true; } /** * Queue up the next job to run. */ protected function queueNextRun() { $nextRun = new ContentReviewNotificationJob(); $nextRunTime = mktime( Config::inst()->get(__CLASS__, 'next_run_hour'), Config::inst()->get(__CLASS__, 'next_run_minute'), 0, date("m"), date("d") + Config::inst()->get(__CLASS__, 'next_run_in_days'), date("Y") ); singleton("QueuedJobService")->queueJob( $nextRun, date("Y-m-d H:i:s", $nextRunTime) ); } }