PHPackages                             okvpn/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. [Queues &amp; Workers](/categories/queues)
4. /
5. okvpn/cron-bundle

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

okvpn/cron-bundle
=================

Docker friendly Symfony cron bundle for handle scheduled tasks consistently, parallel or across a cluster, like Symfony Messenger

1.1.3(2y ago)19498.7k↓19.3%5[1 issues](https://github.com/vtsykun/cron-bundle/issues)1MITPHPPHP &gt;=7.2

Since Jan 17Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (18)Used By (1)

Okvpn - Cron Bundle
===================

[](#okvpn---cron-bundle)

This bundle provides interfaces for registering and handle scheduled tasks within your Symfony application.

[![Latest Stable Version](https://camo.githubusercontent.com/23d2044fd1787afd6c66d3de7cd281a11e867a203fda0112995431a3f13baaf3/68747470733a2f2f706f7365722e6f6b76706e2e6f72672f6f6b76706e2f63726f6e2d62756e646c652f762f737461626c65)](https://packagist.org/packages/okvpn/cron-bundle)[![Total Downloads](https://camo.githubusercontent.com/b94e71aa0170aefe30c515949f00cb624e82bd451c57a013d75bc2a2505b1cb3/68747470733a2f2f706f7365722e6f6b76706e2e6f72672f6f6b76706e2f63726f6e2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/okvpn/cron-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/050d23e6c2b6d8154b738ca4122d96a685df379e780ae4c876a8832e52c8ab99/68747470733a2f2f706f7365722e6f6b76706e2e6f72672f6f6b76706e2f63726f6e2d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/okvpn/cron-bundle)[![License](https://camo.githubusercontent.com/dbbaeb05fd1f6dd24de27c97fc7ab61482adad551ee386b02b93cad652a76935/68747470733a2f2f706f7365722e6f6b76706e2e6f72672f6f6b76706e2f63726f6e2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/okvpn/cron-bundle)

Purpose
-------

[](#purpose)

This is a simpler alternative of existing cron bundle without doctrine deps. Here also added support middleware for customization handling cron jobs across a cluster install: (Send jobs to message queue, like Symfony Messenger; locking; etc.). This allows to limit the number of parallel running processes and prioritized it.

Features
--------

[](#features)

- Not need doctrine/database.
- Docker friendly, runs as background command without `crond`.
- Schedule tasks with one-millisecond precision.
- More ways to randomize crons with `@random 3600` and `jitter`.
- Integration with Symfony Messenger.
- Load a cron job from a different storage (config.yml, tagged services, commands).
- Support many engines to run cron (in parallel process, message queue, consistently).
- Support many types of cron handlers/command: (services, symfony commands, UNIX shell commands).
- Can be used along with timers, subscriber and async I/O with React EventLoop, like Redis subscriber [clue/redis-react](https://github.com/clue/reactphp-redis).
- Middleware and customization.

Table of Contents
-----------------

[](#table-of-contents)

- [Install](#install)
- [Commands](#commands)
- [Registration a new scheduled task](#registration-a-new-scheduled-task)
- [Configuration](#full-configuration-reference)
- [Symfony Messenger Integration](#handle-cron-jobs-via-symfony-messenger)
- [Your own Scheduled Tasks Loader](#your-own-scheduled-tasks-loaders)
- [Handling cron jobs across a cluster](#handling-cron-jobs-across-a-cluster-or-custom-message-queue)
- [Use ReactPHP EventLoop](#use-reactphp-eventloop)

Install
-------

[](#install)

Install using composer:

```
composer require okvpn/cron-bundle

```

For Symfony 4+ add bundle to `config/bundles.php`

```
