semsty/crontab

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

yii2 crontab

Installs: 1 052

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

dev-master 2018-08-16 13:20 UTC

This package is not auto-updated.

Last update: 2024-04-20 09:35:25 UTC


README

Yii2 crontab

add to components

...
    'schedule' => [
        'class' => \semsty\crontab\Component::class,
        'init' => [
            'example' => [
                '* * * * *',
                'echo Hello >> /tmp/world'
            ]
        ]
    ]
...

Usage

./yii schedule/add example '* * * * *' 'echo Hello >> /tmp/world'
Yii::$app->schedule->add('example', '* * * * *', 'echo Hello >> /tmp/world')

crontab will update once a minute