kozo/quartz

There is no license information available for the latest version (0.1.2) of this package.

0.1.2 2021-04-19 09:10 UTC

This package is auto-updated.

Last update: 2024-11-19 17:34:34 UTC


README

composer require kozo/quartz

create quartz file.

php artisan quartz:create

edit quartz file.

app/Quartz/QuartzCron.php

// sample
<?php

namespace App\Quartz;

use Watchmaker\Watchmaker;

class QuartzCron {

    public function handle(Watchmaker $watchmaker): Watchmaker
    {
        $task1 = $watchmaker->task('php hoge/fuga.php');
        $task1 = $task1
            ->month(1)
            ->day(5);
        $watchmaker->add($task1);

        $task2 = $watchmaker->task('php hoge/hoge.php');
        $task2 = $task2
            ->month(2)
            ->day(6);
        $watchmaker->add($task2);

        return $watchmaker;
    }
}

run command

show

show the difference between "crontab" and "Quartz".

php artisan quartz:show

install

Install the difference between "crontab" and "Quartz".

php artisan quartz:install