PHPackages                             boehsermoe/luya-module-scheduler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. boehsermoe/luya-module-scheduler

ActiveLuya-module[Utility &amp; Helpers](/categories/utility)

boehsermoe/luya-module-scheduler
================================

The LUYA Scheduler module.

1.0.2(8y ago)2559MITPHP

Since Apr 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/boehsermoe/luya-module-scheduler)[ Packagist](https://packagist.org/packages/boehsermoe/luya-module-scheduler)[ Docs](http://luya.io)[ RSS](/packages/boehsermoe-luya-module-scheduler/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Scheduler Module
================

[](#scheduler-module)

Installation
------------

[](#installation)

`composer require boehsermoe/luya-module-scheduler:"~1.0.0"`

In order to add the modules to your project go into the modules section of your config:

```
return [
    'modules' => [
        // ...
	'scheduleradmin' => [
            'class' => 'luya\scheduler\admin\Module',
        ],
        'scheduler' => [
            'class' => 'luya\scheduler\frontend\Module',
	    'accessToken' => '{token for web access}' // optional for webcron
        ],
        // ...
    ],
];
```

```
./vendor/bin/luya migrate
./vendor/bin/luya import
```

Don`t forget to assign permission to user group for the scheduler module.

Start jobs manuell via CLI
--------------------------

[](#start-jobs-manuell-via-cli)

Start all expired jobs manual:

```
./luya scheduler/run
```

Execute specified job:

```
./luya scheduler/run/now {id/name of the job}

```

Trigger jobs by cron
--------------------

[](#trigger-jobs-by-cron)

Start all expired jobs every minute via cron:

```
* * * * * ./luya scheduler/run
```

Trigger jobs alternativ
-----------------------

[](#trigger-jobs-alternativ)

### Via Webcron

[](#via-webcron)

Call the route *https://{Host}/scheduler/run?token={Access token from config}* to start expired jobs. You can use this url for webcrons like  or . Or any other webcron service.

### Via yii application event

[](#via-yii-application-event)

```
[
...
 'on afterRequest' => function() {
     if (!$this->isCli()) {
         Yii::$app->getModule('scheduler')->runExpiredJobsAsync();
     }
 },
...
]

```

CommandJob: Execute console commands
------------------------------------

[](#commandjob-execute-console-commands)

For example you can flush the cache every hour by add a new CommandJob (Scheduler -&gt; CommandJobs -&gt; Add) and insert "cache/flush-all" as command. The command is the route of the console command.

[![commandjob-screen](commandjob-screen.png)](commandjob-screen.png)

Custom Jobs
-----------

[](#custom-jobs)

You can also write your own jobs classes in the path "{appBasePath}/schedulers" or "{moduleBasePath}/schedulers". Every job have to inherite from BaseJob.

```
class ExampleJob extends \luya\scheduler\models\BaseJob
{
    public function run()
    {
        // Do your job.
    }
}
```

A job with a text field as option could look like this:

```
class ExampleTextJob extends \luya\scheduler\models\BaseJob
{
    public $text;

    public function rules()
    {
        return array_merge(parent::rules(), [
            [['text'], 'required']
        ]);
    }

    public function extraFields()
    {
        return [
            'text'
        ];
    }

    public function ngrestExtraAttributeTypes()
    {
        return [
            'text' => 'text',
        ];
    }

    public function run()
    {
        // Do your job
	//
	// echo $this->text;
    }
}
```

### More examples

[](#more-examples)

For file backups:

For database backups:

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 97.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21dcb9c8370191d8e148d5d118d7ddd12c9fb465d635f1314bfbbda78d8c610f?d=identicon)[boehsermoe](/maintainers/boehsermoe)

---

Top Contributors

[![boehsermoe](https://avatars.githubusercontent.com/u/2466744?v=4)](https://github.com/boehsermoe "boehsermoe (36 commits)")[![nadar](https://avatars.githubusercontent.com/u/3417221?v=4)](https://github.com/nadar "nadar (1 commits)")

---

Tags

phpbackupyii2moduleyiiluya

### Embed Badge

![Health badge](/badges/boehsermoe-luya-module-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/boehsermoe-luya-module-scheduler/health.svg)](https://phpackages.com/packages/boehsermoe-luya-module-scheduler)
```

###  Alternatives

[luyadev/luya-module-admin

Administration core module for all LUYA admin modules

48179.0k24](/packages/luyadev-luya-module-admin)[luyadev/luya-module-cms

The LUYA CMS module provides a full functional Content Management System for adding contents based on blocks.

32176.1k18](/packages/luyadev-luya-module-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
