Download the PHP package rikudou/cron-bundle without Composer

On this page you can find all versions of the php package rikudou/cron-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cron-bundle

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

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:

Example:

The cron jobs are executed using the console command cron:run, this command should be executed every minute.

Example for crontab:

* * * * * php /path/to/project/bin/console cron:run

Listing cron jobs

If you want to see list of all jobs, run cron:list command from Symfony console.

Example: php bin/console cron:list

Example output:

The listing will also let you know if the cron expression is invalid:

Disabling a cron job

If you have a cron job that you don't want to delete but at the same time you don't want to trigger it, you can define method isEnabled() and let it return false.

You can also use the packaged helper trait Rikudou\CronBundle\Helper\DisabledCronJob.

Example 1 (wihout trait):

Example 2 (using trait):

In both cases the output will be similar to:

Running commands as cron jobs

If you want to run commands as cron jobs, you must configure them in yaml file.

Example:

This setting will run cache:clear every two minutes.

The config file will be created (if it doesn't already exist) when you first run any cron command (cron:list, cron:run) at %projectDir%/config/packages/rikudou_cron.yaml.

IF you need to pass arguments or options to the command, you can do so:

Note that the option and argument names need to match their names as defined in the target command.

Example output from cron:list:


All versions of cron-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
symfony/framework-bundle Version >=4.4
dragonmantank/cron-expression Version ^2.2
symfony/console Version >=4.4
symfony/yaml Version >=4.4
symfony/clock Version >=4.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rikudou/cron-bundle contains the following files

Loading the files please wait ....