PHPackages                             babymarkt/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. [CLI &amp; Console](/categories/cli)
4. /
5. babymarkt/cron-bundle

ActiveSymfony-bundle[CLI &amp; Console](/categories/cli)

babymarkt/cron-bundle
=====================

A simple Symfony cron bundle to edit the system crontab.

v2.0.2(3y ago)28191[4 PRs](https://github.com/Baby-Markt/cron-bundle/pulls)MITPHPPHP &gt;=7.4CI failing

Since Aug 24Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Baby-Markt/cron-bundle)[ Packagist](https://packagist.org/packages/babymarkt/cron-bundle)[ Docs](https://github.com/Baby-Markt/cron-bundle)[ RSS](/packages/babymarkt-cron-bundle/feed)WikiDiscussions 2.x Synced 3w ago

READMEChangelog (4)Dependencies (6)Versions (18)Used By (0)

CronBundle
==========

[](#cronbundle)

A small bundle to manage cron entries in system crontab.

[![Build 2.x](https://github.com/Baby-Markt/cron-bundle/actions/workflows/build.yml/badge.svg?branch=2.x)](https://github.com/Baby-Markt/cron-bundle/actions)[![codecov](https://camo.githubusercontent.com/38743aec2a88ef5d8036a12425c9ff806bad548144e273184ab488ab0dfbbf74/68747470733a2f2f636f6465636f762e696f2f67682f426162792d4d61726b742f63726f6e2d62756e646c652f6272616e63682f322e782f67726170682f62616467652e7376673f746f6b656e3d39384647413350455544)](https://codecov.io/gh/Baby-Markt/cron-bundle)[![Packagist Version](https://camo.githubusercontent.com/bbcbed761332a5e299753b61aa44366b32f0d09253a82238b02a39eaddb1ecef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626162796d61726b742f63726f6e2d62756e646c65)](https://packagist.org/packages/babymarkt/cron-bundle)[![License](https://camo.githubusercontent.com/5b58601d91b5b7dd99247881d8dadea75750e8721e1b53eec05b338db68dd7de/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f426162792d4d61726b742f63726f6e2d62756e646c652e737667)](https://github.com/Baby-Markt/cron-bundle/blob/master/LICENSE)[![PHP from Packagist](https://camo.githubusercontent.com/37aa236d3e56618f994c3fc1e435296db3ae03289beaeb8c7d7a527a2c12cfd2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626162796d61726b742f63726f6e2d62756e646c652f322e782d646576)](https://packagist.org/packages/babymarkt/cron-bundle)[![PHP from Packagist](https://camo.githubusercontent.com/83e2e62dd551522011d6a4478475de8fb447a0c4d2819284217126b4a615740a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f426162792d4d61726b742f63726f6e2d62756e646c652f322e78)](https://github.com/Baby-Markt/cron-bundle)

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

[](#installation)

You need to require this library through composer:

```
composer require babymarkt/cron-bundle
```

If you are using [Symfony Flex](https://github.com/symfony/flex), the following will happen automatically. Otherwise, you have to enable the bundle on the `bundles.php` manually:

```
// config/bundles.php
return [
    // ...
    Babymarkt\Symfony\CronBundle\BabymarktCronBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

Let's start with a minimal setup to run a job every minute:

```
babymarkt_cron:
  cronjobs:
    my_job: 'my:symfony:command'
```

After syncing the cronjobs with the command `bin/console babymarkt-cron:sync --env=prod`, following entry are created in the crontab:

```
###> /your/project-dir:prod ###
# job 'my_job' (no description)
* * * * * cd /your/project-dir; php bin/console --env=prod my:symfony:command 2>&1 1>>/dev/null
###< /your/project-dir:prod ###

```

To learn more about CRON see [CRON expression on Wikipedia](https://en.wikipedia.org/wiki/Cron#CRON_expression).

### Examples

[](#examples)

A job running every day at 3:30 AM

```
babymarkt_cron:
  cronjobs:
    my_job:
      command: 'my:symfony:command'
      minutes: 30
      hours: 3
```

A job running every Tuesday every 10 minutes between 1:00 and 4:00 AM

```
babymarkt_cron:
  cronjobs:
    my_job:
      command: 'my:symfony:command'
      minutes: '*/10' # or '0,10,20,30,40,50'
      hours: '1-4'
      weekdays: 3 # Tuesday (SUN-SAT: 0-6)
```

### Full configuration reference

[](#full-configuration-reference)

```
babymarkt_cron:
    options:
        # This ID is used to identify the job block in the crontab. If not defined,
        # it is automatically generated from the project directory and the environment.
        id: ~

        # The script to run the commands.
        script: 'bin/console'

        # The working directory. Defaults to %kernel.project_dir%.
        working_dir: ~

        # Specifies globally where the output should be written to.
        output:
            file: '/dev/null'
            append: true

        # Crontab options
        crontab:
            # Crontab executable.
            bin: 'crontab'
            # Path to store the temporary crontab content. Defaults to the system temp dir.
            tmpPath: ~
            # The user to execute the crontab.
            user: ~
            # Defines whether sudo is used or not.
            sudo: false
    cronjobs:
        # The name of the job definition
        your-first-job-name:

            # Definition of the execution time
            # See https://en.wikipedia.org/wiki/Cron#CRON_expression
            minutes: *
            hours: *
            days: *
            months: *
            weekdays: *

            # The Symfony command to execute.
            command: ~ # required

            # If TRUE, the command isn't executed.
            disabled: false

            # Overwrites the global output settings.
            output:
                file: ~
                append: ~

            # Command arguments and options.
            arguments:
                - ''
                - ''
                #...
```

Commands
--------

[](#commands)

### `babymarkt-cron:drop`

[](#babymarkt-crondrop)

Drops all the whole cronjobs block from crontab not considering the configured cronjobs.

### `babymarkt-cron:dump`

[](#babymarkt-crondump)

Generates the cron entries which may be installed to crontab and shows it on console.

### `babymarkt-cron:report`

[](#babymarkt-cronreport)

Show some reports about the execution of the configured cronjobs. This features required the DoctrineBundle.

### `babymarkt-cron:sync`

[](#babymarkt-cronsync)

Syncs the configured cronjobs with the crontab. Only the related cron block will be affected.

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

[](#contributing)

Bug reports and pull requests are welcome on GitHub at .

License
-------

[](#license)

The bundle is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance61

Regular maintenance activity

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 95.5% 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 ~382 days

Recently: every ~399 days

Total

10

Last Release

518d ago

Major Versions

1.x-dev → v2.0.02022-01-04

PHP version history (4 changes)1.0.0PHP &gt;=5.5

v1.1.2PHP &gt;=5.6

v2.0.0PHP &gt;=7.4

2.x-devPHP 7.4 - 8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/446784?v=4)[Niklas](/maintainers/u-nik)[@u-nik](https://github.com/u-nik)

---

Top Contributors

[![u-nik](https://avatars.githubusercontent.com/u/446784?v=4)](https://github.com/u-nik "u-nik (63 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![Tardog](https://avatars.githubusercontent.com/u/22562624?v=4)](https://github.com/Tardog "Tardog (1 commits)")

---

Tags

phpsymfonycroncrontabcrond

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2836.4k9](/packages/inspector-apm-inspector-symfony)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

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