PHPackages                             tobento/app-schedule - 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. tobento/app-schedule

ActiveLibrary

tobento/app-schedule
====================

App schedule support.

2.0.1(3mo ago)0191MITPHPPHP &gt;=8.4

Since Dec 1Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/tobento-ch/app-schedule)[ Packagist](https://packagist.org/packages/tobento/app-schedule)[ Docs](https://www.tobento.ch)[ RSS](/packages/tobento-app-schedule/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (4)Dependencies (12)Versions (6)Used By (1)

App Schedule
============

[](#app-schedule)

Schedule support for the app using the [Schedule Service](https://github.com/tobento-ch/service-schedule).

Table of Contents
-----------------

[](#table-of-contents)

- [Getting Started](#getting-started)
    - [Requirements](#requirements)
- [Documentation](#documentation)
    - [App](#app)
    - [Schedule Boot](#schedule-boot)
        - [Scheduling Tasks](#scheduling-tasks)
        - [Running Scheduled Tasks](#running-scheduled-tasks)
- [Credits](#credits)

---

Getting Started
===============

[](#getting-started)

Add the latest version of the app schedule project running this command.

```
composer require tobento/app-schedule

```

Requirements
------------

[](#requirements)

- PHP 8.4 or greater

Documentation
=============

[](#documentation)

App
---

[](#app)

Check out the [**App Skeleton**](https://github.com/tobento-ch/app-skeleton) if you are using the skeleton.

You may also check out the [**App**](https://github.com/tobento-ch/app) to learn more about the app in general.

Schedule Boot
-------------

[](#schedule-boot)

The schedule boot does the following:

- implements schedule interfaces
- boots the [Console Boot](https://github.com/tobento-ch/app-console#console-boot) and adds schedule commands to console

```
use Tobento\App\AppFactory;
use Tobento\Service\Schedule\ScheduleInterface;
use Tobento\Service\Schedule\ScheduleProcessorInterface;
use Tobento\Service\Schedule\TaskProcessorInterface;

// Create the app
$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots
$app->boot(\Tobento\App\Schedule\Boot\Schedule::class);
$app->booting();

// Implemented interfaces:
$schedule = $app->get(ScheduleInterface::class);
$scheduleProcessor = $app->get(ScheduleProcessorInterface::class);
$taskProcessor = $app->get(TaskProcessorInterface::class);

// Run the app
$app->run();
```

If you are not using the [App Skeleton](https://github.com/tobento-ch/app-skeleton/) check out the [App Console Boot](https://github.com/tobento-ch/app-console#console-boot) section as you might adjust the `app` file.

### Scheduling Tasks

[](#scheduling-tasks)

You can schedule tasks in severval ways:

**Using the app**

You may use the app `on` method to schedule tasks only if the schedule is requested.

```
use Tobento\App\AppFactory;
use Tobento\Service\Schedule\ScheduleInterface;

// Create the app
$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots:
$app->boot(\Tobento\App\Schedule\Boot\Schedule::class);

// Adding tasks:
$app->on(ScheduleInterface::class, static function(ScheduleInterface $schedule): void {
    $schedule->task($task);
});

// Run the app
$app->run();
```

**Using a boot**

You may create a boot for scheduling tasks:

```
use Tobento\App\Boot;
use Tobento\App\Schedule\Boot\Schedule;
use Tobento\Service\Schedule\ScheduleInterface;

class MyScheduleTasksBoot extends Boot
{
    public const BOOT = [
        // you may ensure the schedule boot.
        Schedule::class,
    ];

    public function boot()
    {
        $this->app->on(ScheduleInterface::class, static function(ScheduleInterface $schedule): void {
            $schedule->task($task);
        });
    }
}
```

Check out the [Schedule Service - Schedule](https://github.com/tobento-ch/service-schedule#schedule) section to learn more about it.

Furthermore, all the [Tasks](https://github.com/tobento-ch/service-schedule#tasks) and [Task Parameters](https://github.com/tobento-ch/service-schedule#task-parameters) are ready to use without any requirements.

### Running Scheduled Tasks

[](#running-scheduled-tasks)

To run the scheduled tasks, add a cron configuration entry to your server that runs the schedule:run command every minute.

```
* * * * * cd /path-to-your-project && php ap schedule:run >> /dev/null 2>&1

```

Credits
=======

[](#credits)

- [Tobias Strub](https://www.tobento.ch)
- [All Contributors](../../contributors)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance79

Regular maintenance activity

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~156 days

Recently: every ~45 days

Total

6

Last Release

109d ago

Major Versions

1.x-dev → 2.02025-10-03

PHP version history (2 changes)1.0.0PHP &gt;=8.0

2.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/055d6a1b5c2384bb179c75ab0b55914231d898fdc4dffeb30770f81200e52206?d=identicon)[TOBENTOch](/maintainers/TOBENTOch)

---

Top Contributors

[![tobento-ch](https://avatars.githubusercontent.com/u/16684832?v=4)](https://github.com/tobento-ch "tobento-ch (11 commits)")

---

Tags

packagescheduletaskapptobento

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tobento-app-schedule/health.svg)

```
[![Health](https://phpackages.com/badges/tobento-app-schedule/health.svg)](https://phpackages.com/packages/tobento-app-schedule)
```

PHPackages © 2026

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