classes/Job.md

Job

Overview:

Job is a simple database-backed queue built on Model.

Use Job for database-backed background work such as email delivery, retries, and async processing that can be executed outside the request cycle.

Key behavior:

Public API:

Example:

Job::register('email', function (Job $job, $payload) {
  Email::send($payload);
});
Job::queue('email', ['to' => 'user@example.com']);
Job::execute();