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

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

aequasi/cron-bundle
===================

This bundle provides scheduled execution of Symfony2 commands, base on colourstream/cron-bundle

1.0.1(11y ago)3852MITPHPPHP &gt;=5.4

Since Nov 22Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (3)Used By (0)

Cron Bundle
===========

[](#cron-bundle)

This bundle provides a simple interface for registering repeated scheduled tasks within your application.

This bundle is tested only against Symfony 2.3, but should work on anything after 2.3, until at least 3.0.

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

[](#installation)

1. Add the bundle to your project as a composer dependency:

```
$ composer require aequasi/cron-bundle "~1.0.0"
```

3. Add the bundle to AppKernel:

```
// AppKernel.php
public function registerBundles()
{
	// ...
	$bundles = array(
		// ...
        new Aequasi\Bundle\CronBundle\AequasiCronBundle(),
	);
    // ...

    return $bundles;
}
```

3. Start using the bundle:

```
$ app/console cron:scan
$ app/console cron:run
```

Running your cron jobs automatically
------------------------------------

[](#running-your-cron-jobs-automatically)

This bundle is designed around the idea that your tasks will be run with a minimum interval - the tasks will be run no more frequently than you schedule them, but they can only run when you trigger then (by running `app/console cron:run`, or the forthcoming web endpoint, for use with webcron services).

To facilitate this, you can create a cron job on your system like this:

```
*/5 * * * * /path/to/symfony/install/app/console cron:run

```

This will schedule your tasks to run at most every 5 minutes - for instance, tasks which are scheduled to run every 3 minutes will only run every 5 minutes.

Creating your own tasks
-----------------------

[](#creating-your-own-tasks)

Creating your own tasks with CronBundle couldn't be easier - all you have to do is create a normal Symfony2 Command (or ContainerAwareCommand) and tag it with the @CronJob annotation, as demonstrated below:

```
/**
 * @CronJob("PT1H")
 */
class DemoCommand extends Command
{
    // ...
}
```

The interval spec ("PT1H" in the above example) is documented on the [DateInterval](http://au.php.net/manual/en/dateinterval.construct.php) documentation page, and can be modified whenever you choose. For your CronJob to be scanned and included in future runs, you must first run `app/console cron:scan` - it will be scheduled to run the next time you run `app/console cron:run`

#### If you add a new command, you have to run the scan function for it to get picked up, or clear the symfony cache.

[](#if-you-add-a-new-command-you-have-to-run-the-scan-function-for-it-to-get-picked-up-or-clear-the-symfony-cache)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

2

Last Release

4192d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cf67675d97e63f6ff9e7fed55f35502b24cd834081806a6731229117c0630bb?d=identicon)[aequasi](/maintainers/aequasi)

---

Top Contributors

[![predakanga](https://avatars.githubusercontent.com/u/830645?v=4)](https://github.com/predakanga "predakanga (10 commits)")[![cryptiklemur](https://avatars.githubusercontent.com/u/896295?v=4)](https://github.com/cryptiklemur "cryptiklemur (9 commits)")[![yberkholz](https://avatars.githubusercontent.com/u/1708117?v=4)](https://github.com/yberkholz "yberkholz (1 commits)")

---

Tags

timecronschedule

### Embed Badge

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

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

###  Alternatives

[dragonmantank/cron-expression

CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due

4.7k474.1M487](/packages/dragonmantank-cron-expression)[league/period

Time range API for PHP

7335.4M21](/packages/league-period)[florianv/business

DateTime calculations in business hours

359775.9k1](/packages/florianv-business)[symfony/scheduler

Provides scheduling through Symfony Messenger

8810.8M52](/packages/symfony-scheduler)[mult1mate/cron-manager

Flexible cron tasks manager for MVC-type applications

40338.5k3](/packages/mult1mate-cron-manager)[shapecode/cron-bundle

This bundle provides scheduled execution of Symfony commands

59493.0k2](/packages/shapecode-cron-bundle)

PHPackages © 2026

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