PHPackages                             mintware-de/native-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. mintware-de/native-cron-bundle

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

mintware-de/native-cron-bundle
==============================

A Symfony bundle for mintware-de/native-cron

v1.0.1(3y ago)6226MITPHPPHP ^8.1

Since Nov 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mintware-de/native-cron-bundle)[ Packagist](https://packagist.org/packages/mintware-de/native-cron-bundle)[ RSS](/packages/mintware-de-native-cron-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (4)Used By (0)

Native Cron Bundle
==================

[](#native-cron-bundle)

This package provides a Symfony Bundle for the [`mintware-de/native-cron`](https://github.com/mintware-de/native-cron) package.

The main purpose is easily managing cron jobs for your application.

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

[](#installation)

```
composer require mintware-de/native-cron-bundle
```

Since cron jobs stored differently based on the operating system, you've to set the `CrontabFileLocatorInterface`in your service definition.

This bundle will only work with drop-in crontab files. So make sure that the implementation supports that feature.

```
services:
    MintwareDe\NativeCron\Filesystem\CrontabFileLocatorInterface:
        class: MintwareDe\NativeCron\Filesystem\DebianCrontabFileLocator
```

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

[](#requirements)

- PHP 8.1+
- Symfony 6.1

Usage
-----

[](#usage)

### Mark Commands as Cronjobs

[](#mark-commands-as-cronjobs)

After installing the bundle you can use the `#[CronJob(...)]` annotation (`MintwareDe\NativeCronBundle\Attribute\CronJob`) on your console commands.

This annotation accepts 2-5 arguments:

```
#[CronJob(
    name: 'my_cron_job',    // This is the name of the cron job. It is used to trigger the command
                            // using the mw:cron:run command

    #           .---------------- minute (0 - 59)
    #           | .-------------- hour (0 - 23)
    #           | | .------------ day of month (1 - 31)
    #           | | | .---------- month (1 - 12)
    #           | | | | .-------- day of week (0 - 6; Sunday=0)
    #           | | | | |
    executeAt: '* * * * *', // This is the execution time definition. The format is identical to the crontab file.
    user: 'root',           // The user that will be used to run the command. Optional, default = root
    arguments: [            // The arguments that are passed to your command. See also here (ArrayInput): https://symfony.com/doc/current/console/calling_commands.html
        'name'    => 'Foo', // InputArgument
        '--yell'  => true,  // Input option
    ],
)]
#[AsCommand(...)]
class MyCommand extends \Symfony\Component\Console\Command\Command {
    // ...
}
```

### List / Install / Uninstall

[](#list--install--uninstall)

You can use the Symfony console to list, install and uninstall the cron jobs. **Remember: Install and uninstall may require higher user privileges!** (su root / sudo etc.)

#### List

[](#list)

```
$ php bin/console mw:cron:list

Cron jobs
=========

 -------------- ------------ ---------------- ------------
  Name           Execute At   Arguments        Command
 -------------- ------------ ---------------- ------------
  my_cron_job    * * * * *    []               MyCronJob
  my_cron_job2   0 1 * * *    {"arg2":"foo"}   MyCronJob2
 -------------- ------------ ---------------- ------------
```

#### Install

[](#install)

```
$ php bin/console mw:cron:install

New crontab content
===================

* * * * * root /usr/local/Cellar/php/8.1.10_1/bin/php /source/bin/console mw:cron:run my_cron_job
0 1 * * * root /usr/local/Cellar/php/8.1.10_1/bin/php /source/bin/console mw:cron:run my_cron_job2

 Confirm crontab? (yes/no) [yes]:
 > yes

```

#### Uninstall

[](#uninstall)

```
$ php bin/console mw:cron:uninstall

Uninstall cron jobs
===================

 [WARNING] The following cron jobs will be uninstalled:

* * * * * root /usr/local/Cellar/php/8.1.10_1/bin/php /source/bin/console mw:cron:run my_cron_job
0 1 * * * root /usr/local/Cellar/php/8.1.10_1/bin/php /source/bin/console mw:cron:run my_cron_job2

 Confirm uninstall? (yes/no) [yes]:
 >

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity16

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

Total

2

Last Release

1285d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2362734?v=4)[Julian Finkler](/maintainers/Devtronic)[@devtronic](https://github.com/devtronic)

---

Top Contributors

[![devtronic](https://avatars.githubusercontent.com/u/2362734?v=4)](https://github.com/devtronic "devtronic (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mintware-de-native-cron-bundle/health.svg)

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

###  Alternatives

[symfony/ux-chartjs

Chart.js integration for Symfony

1003.2M18](/packages/symfony-ux-chartjs)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[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)[pentiminax/ux-datatables

DataTables.net integration for Symfony

605.6k](/packages/pentiminax-ux-datatables)

PHPackages © 2026

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