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

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

rikudou/cron-bundle
===================

Simple and effective cron implementation for Symfony 4+

v1.3.0(1y ago)35.6k3MITPHPPHP ^8.0

Since Jul 19Pushed 1y ago2 watchersCompare

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

READMEChangelogDependencies (5)Versions (25)Used By (0)

How to install
--------------

[](#how-to-install)

Via composer: `composer require rikudou/cron-bundle`.

The bundle should be enabled automatically if you use the Symfony Flex.

How to use
----------

[](#how-to-use)

Every cron job must implement the `Rikudou\CronBundle\Cron\CronJobInterface`(every class that implements the interface is automatically registered as cron job), which defines two methods:

- `string getCronExpression()` - the [cron expression](https://en.wikipedia.org/wiki/Cron#Overview)
- `execute(InputInterface $input, OutputInterface $output, LoggerInterface $logger)` - the method that will be executed, you can write to console output, use console input and use logger

Example:

```
