PHPackages                             rewieer/taskschedulerbundle - 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. rewieer/taskschedulerbundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

rewieer/taskschedulerbundle
===========================

Task Scheduler with CRON for Symfony

0.13.0(2y ago)63251.6k↓43.8%17[3 issues](https://github.com/ancyrweb/TaskSchedulerBundle/issues)[1 PRs](https://github.com/ancyrweb/TaskSchedulerBundle/pulls)MITPHPPHP ^7.4|^8.1CI passing

Since Jul 10Pushed 1w ago8 watchersCompare

[ Source](https://github.com/ancyrweb/TaskSchedulerBundle)[ Packagist](https://packagist.org/packages/rewieer/taskschedulerbundle)[ RSS](/packages/rewieer-taskschedulerbundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (7)Versions (17)Used By (0)

Task Scheduler Bundle
=====================

[](#task-scheduler-bundle)

A task scheduler for **Symfony** applications using [CRON](https://en.wikipedia.org/wiki/Cron) jobs porting that allows you to run tasks periodically.

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

[](#requirements)

For this bundle to work, you must be able to define *CRON* jobs on your server.

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

[](#installation)

Start by adding the bundle to your *composer.json* : `composer require rewieer/taskschedulerbundle`

Symfony Flex will automatically enable that bundle for you. If you are not using Flex yet, add the bundle to your *AppKernel.php* :

```
// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Rewieer\TaskSchedulerBundle\RewieerTaskSchedulerBundle(),
    // ...
);
```

You're ready to start scheduling!

Usage
-----

[](#usage)

First, add the following line to your *CRON* tabs : `* * * * * php /path/to/your/project/bin/console ts:run >> /dev/null 2>&1`

> This will call the scheduler, which will review all scheduled tasks and dispatch accordingly. You can call a task directly by providing it's **ID** as a parameter to the command. Note that this **ID** is generated by the scheduler and is in no way related to the service itself.

> The `>> /dev/null 2>&1` option discards the printed results of the tasks. Removing it allows to send it by email instead. This may vary so please refer to your server's configuration.

You then need to create a task. Tasks can be any service! You just have to give it the `ts.task` tag and implement `TaskInterface`, or for simplicity extend from `AbstractScheduledTask`.

### Every X Minutes

[](#every-x-minutes)

In `Foo\Bar\Task` to schedule a task **every 5 minutes**:

```
use Rewieer\TaskSchedulerBundle\Task\AbstractScheduledTask;
use Rewieer\TaskSchedulerBundle\Task\Schedule;

class Task extends AbstractScheduledTask {
  protected function initialize(Schedule $schedule) {
    $schedule
      ->everyMinutes(5); // Perform the task every 5 minutes
  }

  public function run() {
    // Do stuff
  }
}
```

Your task is now scheduled and will be called every 5 minutes.

### Every X Hours or Daily

[](#every-x-hours-or-daily)

if you are scheduling your task on an hourly or daily basis, you'll need to set `minutes()` in addition to `hours()`, `everyHours()`, or `daily()`. **If you omit `minutes()`, the task will run every minute on the scheduled hour(s).**

In `Foo\Bar\Task` to schedule a task **every 5 hours**:

```
use Rewieer\TaskSchedulerBundle\Task\AbstractScheduledTask;
use Rewieer\TaskSchedulerBundle\Task\Schedule;

class Task extends AbstractScheduledTask {
  protected function initialize(Schedule $schedule) {
    $schedule
      ->minutes(0)
      ->everyHours(5); // Perform the task every 5 hours on minute 0

    // Or if you want to perform your task at midnight every day
    // $schedule->minutes(0)->hours(0)->daily();

    // Or schedule your task to run once at 9AM daily (this is effectively the same as daily() above)
    // $schedule->minutes(0)->hours(9);
  }

  public function run() {
    // Do stuff
  }
}
```

You're good to go! You can now check your logs to see if this is working.

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance63

Regular maintenance activity

Popularity48

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~135 days

Recently: every ~227 days

Total

16

Last Release

885d ago

PHP version history (4 changes)0.2.0PHP ^7.1

0.6.0PHP ^7.2

0.8.0PHP ^7.2|^8.0

0.12.0PHP ^7.4|^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/191989882?v=4)[Bugbounty POC by @nvk0x](/maintainers/Rewieer)[@rewieer](https://github.com/rewieer)

---

Top Contributors

[![NicoHaase](https://avatars.githubusercontent.com/u/1069028?v=4)](https://github.com/NicoHaase "NicoHaase (24 commits)")[![ancyrweb](https://avatars.githubusercontent.com/u/12291995?v=4)](https://github.com/ancyrweb "ancyrweb (15 commits)")[![marcin-derlukiewicz](https://avatars.githubusercontent.com/u/6348155?v=4)](https://github.com/marcin-derlukiewicz "marcin-derlukiewicz (3 commits)")[![Zasco](https://avatars.githubusercontent.com/u/35970970?v=4)](https://github.com/Zasco "Zasco (2 commits)")[![fwolfsjaeger](https://avatars.githubusercontent.com/u/469206?v=4)](https://github.com/fwolfsjaeger "fwolfsjaeger (2 commits)")[![mrshaharb](https://avatars.githubusercontent.com/u/30053246?v=4)](https://github.com/mrshaharb "mrshaharb (1 commits)")[![paha77](https://avatars.githubusercontent.com/u/5096366?v=4)](https://github.com/paha77 "paha77 (1 commits)")[![mikeyudin](https://avatars.githubusercontent.com/u/981848?v=4)](https://github.com/mikeyudin "mikeyudin (1 commits)")

---

Tags

schedulersymfonybundlecrontask

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rewieer-taskschedulerbundle/health.svg)

```
[![Health](https://phpackages.com/badges/rewieer-taskschedulerbundle/health.svg)](https://phpackages.com/packages/rewieer-taskschedulerbundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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