Download the PHP package mhary/cron-bundle without Composer
On this page you can find all versions of the php package mhary/cron-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package cron-bundle
MharyCronBundle
Symfony2 / Symfony 3 Bundle for setting up cron jobs via configuration.
Fork of unsupported skck/SbkCronBundle
PHP 7.0+ required
Installation
Prerequisites
This bundle requires Symfony 2.1+
Now install it with this command:
Enable the bundle
You need to add the bundle in app/AppKernel.php
Import Services
The CronBundle depends on certain services, so you need to import the service configuration in app/config/config.yml
Now you should be able to use the Cron Manager.
Usage
Configuring Tasks
Tasks can be configured in app/config/config(_prod).yml
.
Each entry in mhary_cron.tasks
represents a task.
command
The command to execute. By default the cron manager will prepend php %kernel.root_dir%/console
before the command name, so configuring console commands is easy. You can run every command you want with this bundle, read on how to do so.
expression
The cron expression, any valid expression that you would enter in a cron table.
bin
The binary which will execute the command (php
by default, you could enter ''
to omit the bin in the execution command)
script
The script that will be called (%kernel.root_dir%/console
by default).
Runnign the master cron job
Even if you can configure all cron jobs with this bundle, you need to add one line to the crontab manually, the cron:run
command.
This will execute the cron manager every minute.
The manager will check which tasks need to be executed and will create background processes for every due task.
License
The MIT License. For the full text of license, please, see LICENSE
All versions of cron-bundle with dependencies
symfony/framework-bundle Version 2.8.*|^3.0
mtdowling/cron-expression Version 1.2.*