src/Shell/Task/QueueSuperExampleTask.php
public function run(array $data, $jobId) {
		$this->hr();
		$this->out('CakePHP Queue SuperExample task.');
		$this->hr();
		$this->success(' -> Success, the SuperExample Job was run. <-');

		// Lets create an Example task on successful execution
		$this->QueuedJobs->createJob('Example');
	}
public function run(array $data, $jobId) {
		$this->hr();
		$this->out('CakePHP Queue SuperExample task.');
		$this->hr();
		$this->success(' -> Success, the SuperExample Job was run. <-');

		// Lets create an Example task on successful execution
		$this->QueuedJobs->createJob('Example');
	}
public function run ( array $ data , $ jobId ) { $ this -> hr ( ) ; $ this -> out ( 'CakePHP Queue SuperExample task.' ) ; $ this -> hr ( ) ; $ this -> success ( ' -> Success, the SuperExample Job was run. <-' ) ; // Lets create an Example task on successful execution $ this -> QueuedJobs -> createJob ( 'Example' ) ; }
SuperExample run function.
This function is executed, when a worker is executing a task.
The return parameter will determine, if the task will be marked completed, or be requeued.

@param array $data The array passed to QueuedJobsTable::createJob()
@param int $jobId The id of the QueuedJob entity
@return void
SuperExample run function . This function is executed when a worker is executing a task . The return parameter will determine if the task will be marked completed or be requeued .