KMP PHP API Reference

TaskInterface

Any task needs to at least implement run().

The add() is mainly only for CLI adding purposes and optional.

Either throw an exception with an error message, or use $this->abort('My message'); to fail a job.

Tags
author

Mark Scherer

license

http://www.opensource.org/licenses/mit-license.php The MIT License

Table of Contents

Methods

run()  : void
Main execution of the task.

Methods

run()

Main execution of the task.

public run(array<string, mixed> $data, int $jobId) : void
Parameters
$data : array<string, mixed>

The array passed to QueuedJobsTable::createJob()

$jobId : int

The id of the QueuedJob entity


        
On this page

Search results