Job

What is a job?

A job is the class that is responsible for what your code is doing.

This is the class you will have to create (or reuse), as it contains the business logic required for what you wish to achieve.

How to create a job?

<?php

use Yokai\Batch\JobExecution;
use Yokai\Batch\Job\JobInterface;

class DoStuffJob implements JobInterface
{
    public function execute(JobExecution $jobExecution): void
    {
        // you stuff here
    }
}

The only requirement is implementing JobInterface,

What types of job exists?

Built-in jobs:

Jobs from bridges:

  • From league/flysystem bridge: