PHPackages                             course-hero/symfony-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. course-hero/symfony-cron-bundle

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

course-hero/symfony-cron-bundle
===============================

Cron-related utilities for Symfony2

v0.2.0(11y ago)19.5k3Apache-2PHPPHP &gt;= 5.3.3

Since Nov 3Pushed 11y ago23 watchersCompare

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

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

README
======

[](#readme)

What is symfony-cron?
---------------------

[](#what-is-symfony-cron)

*symfony-cron* is a bundle of utilities for [Symfony2](http://symfony.com) that provide functions related to scheduled tasks run out of a cron context.

[![Build Status](https://camo.githubusercontent.com/cfa149333e5d76cb60b92017a82d544ef075e3dea2abc6de93616a81b76c5924/68747470733a2f2f7472617669732d63692e6f72672f636f757273652d6865726f2f73796d666f6e792d63726f6e2d62756e646c652e737667)](https://travis-ci.org/course-hero/symfony-cron-bundle) [![Coverage Status](https://camo.githubusercontent.com/a8ed439b051d72f1866bc41d8204e0162f42294946c322b620ce3aa1b79c3f32/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f636f757273652d6865726f2f73796d666f6e792d63726f6e2d62756e646c652e737667)](https://coveralls.io/r/course-hero/symfony-cron-bundle)

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

[](#requirements)

*symfony-cron* is supported on [PHP 5.4+](http://php.net) with [Symfony 2.5+](http://symfony.com).

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

[](#installation)

The best way to install *symfony-cron* is to include the bundle using a mechanism such as [composer](http://getcomposer.org). Information about the package is published to [packagist](https://packagist.org/).

Use
---

[](#use)

To use *symfony-cron* in a Symfony2-based project, start by defining how you want to use the system. The following checklist might help:

- What type of lock service will be used? (File, memcached, etc.)
- Do commands need to be executed in a child process?
    - Processes that unexpectedly terminate cause locks to be unreleased if not executed in a child process, thus preventing future processes from running.

### Example: File Lock with Child Process

[](#example-file-lock-with-child-process)

app/config/config.yml:

```
services:
    symfony_cron.lock_file_service:
        class: SymfonyCronBundle\Component\Lock\LockFileService
    symfony_cron.default_lock_service: "@symfony_cron.lock_file_service"
    symfony_cron.process_service:
        class: SymfonyCronBundle\Component\Process\ProcessService
```

crontab:

```
* * * * * /path/to/script

```

/path/to/script:

```
#!/bin/bash

/usr/bin/php \
    /path/to/symfony/app/console \
    cron:single_exec \
        --id /path/to/lock/files/some-unique-file \
        --child_process \
    -- \
        /path/to/child/script \
        --script-option \
        script-args
```

### Example: Multiple Instances of Same Script as Embedded Application

[](#example-multiple-instances-of-same-script-as-embedded-application)

app/config/config.yml:

```
services:
    symfony_cron.lock_file_service:
        class: SymfonyCronBundle\Component\Lock\LockFileService
    symfony_cron.default_lock_service: "@symfony_cron.lock_file_service"
    symfony_cron.process_service:
        class: SymfonyCronBundle\Component\Process\ProcessService
```

crontab:

```
* * * * * /path/to/script instance-1-unique-key parameter-set-1
* * * * * /path/to/script instance-2-unique-key parameter-set-2

```

/path/to/script:

```
#!/bin/bash

KEY="$1"
PARAM="$2"

/usr/bin/php \
    /path/to/symfony/app/console \
    cron:single_exec \
        --id ${KEY} \
    -- \
        some:command \
        ${PARAM}
```

Contributing
------------

[](#contributing)

*symfony-cron* is an open source, community-driven project. If you'd like to contribute, please read the [Contributing](CONTRIBUTING.md) documentation. If you're submitting a pull request, please follow the guidelines in the [Submitting a Patch](CONTRIBUTING.md) section and use [Pull Request Template](CONTRIBUTING.md).

Running Tests
-------------

[](#running-tests)

All tests are supported using standard [phpunit](https://phpunit.de) practices. A [helper script](phpunit.sh) has also been provided to assist with running tests.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

4204d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fac5c39658a601734da88cb616b095b5660566e3702d24267b28a7ae1af6c909?d=identicon)[cverges-ch](/maintainers/cverges-ch)

---

Tags

symfonycron

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/course-hero-symfony-cron-bundle/health.svg)

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

###  Alternatives

[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)[glooby/task-bundle

Scheduling of tasks for symfony made simple

3216.3k](/packages/glooby-task-bundle)

PHPackages © 2026

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