PHPackages                             skrip42/cron-bundle - 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. skrip42/cron-bundle

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

skrip42/cron-bundle
===================

Symfony Cron-bundle

v1.2.3(5y ago)3439MITPHPPHP ^7.1.3

Since Dec 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Skrip42/cron-bundle)[ Packagist](https://packagist.org/packages/skrip42/cron-bundle)[ Docs](https://github.com/Skrip42/cron-bundle)[ RSS](/packages/skrip42-cron-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (7)Used By (0)

cron-bundle
===========

[](#cron-bundle)

task scheduler for symfony witch extended syntax similar to cron.

install:
--------

[](#install)

- run `composer require skrip42/cron-bundle`
- create database `php ./bin/console make:migration` and `php ./bin/console doctrine:migration:migrate`
- add `*       *       *       *       *       ./bin/console cron:run` in you crontab

schedule-task syntax:
---------------------

[](#schedule-task-syntax)

task pattern is `{minute}_{house}_{day}_{weekday}_{month}_{year}`

operantdescriptionexample`*`run everytime`*_*_*_*_*_* `- will be executed every minute`n,m`run in n and m`5,10_*_*_*_*_*` - will be executed in 5 and 10 minute`!n`run everytime except n`*_*_*_!1_*_*` - will be executed everytime except Monday`n+m`run in n+m`5+10_*_*_*_*_*` - will be executed in 15 minutes`n-m`run in n-m`15-10_*_*_*_*_*` - will be execute in 5 minutes`-n`run in m-n where m is max value of range (-5 in minute part equal 55 minute)`*_*_- 1_*_*_*` - will be executed on the last day of the month`n/m`run when n aliquot m (\*/5 in minute part - run every 5 minute)`*/5_*_*_*_*_*` - will be executed every 5 minutes`n:m`run in range from n to m`5:10_*_*_*_*_*` - will be executed in 5,6,7,8,9 and 10 minutes`(n)`group of operators`!(5,10,15)_*_*_*_*_*` - will be executed every minute except 5,10 and 15 minuteOperators can be combined, for example: `0_0_*/2-1_*_*_*` - will be executed at midnight on odd days.

available command:
------------------

[](#available-command)

- `cron:add` - interactiv adding cron task
- `cron:closest` - show list of closest task
- `cron:list` - show list of cron task
- `cron:list --all` - show list of all activity status cron task
- `cron:optimize` - disable outdated cron tasks
- `cron:run` - run actual task
- `cron:update $id` - update cron task
- `cron:toggle $id` - toggle cron task activity

usage:
------

[](#usage)

```
....... //you namespace declaration

use Skrip42\Bundle\CronBundle\Services\Cron;
use Skrip42\Bundle\CronBundle\Component\Pattern;

....... //you class declaration

protected $cron; //instance of Cron service

public function __construct(Cron $cron) {
    $this->cron = $cron
}

........ //in you method
$this->cron->getActualOnCurrentTime(); // return array of actual Schedule entity
$this->cron->optimize(); // disable outdated cron tasks
$this->cron->closestList($count); // return $count closest task in format: [$id, $command, $c]
$this->cron->getList($all); // return all schedule task? if $all = true includes disabled task
$this->cron->addSchedule($patternString, $commandString); // create new schedule task
$this->cron->toggleSchedule($id); // toggle schedule task activity
$this->cron->updateSchedule($id, $patternString, $commandString); // update schedule task

$pattern = new Pattern($patternString); // get pattern object
$pattern->test(new DateTime('NOW')); // test pattern for match date
$pattern->getClosest($count); //return $count closest date that match pattern

$schedule = reset($this->cron->getList()); // schedule is standart doctrine entity
$schedule->getId(); //return id
$schedule->getCommand(); // return command string
$schedule->setCommand($commandString); // set command string to schedule
$schedule->getPattern(); // return pattern string
$schedule->setPattern($patternString); // set pattern string to schedule
$schedule->toggleActive(); // toggle schedule activity

$this->container->get('doctrine')->getManager()->flush(); // to save change
........
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Total

5

Last Release

1936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac2ab44421653cebc795140356530287c37ba8c2011790683db6d2b316ea0e8d?d=identicon)[skrip42](/maintainers/skrip42)

---

Top Contributors

[![Skrip42](https://avatars.githubusercontent.com/u/11675343?v=4)](https://github.com/Skrip42 "Skrip42 (23 commits)")

### Embed Badge

![Health badge](/badges/skrip42-cron-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/skrip42-cron-bundle/health.svg)](https://phpackages.com/packages/skrip42-cron-bundle)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

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