padam87/cron-bundle

A cron job manager for symfony console.

Installs: 42 269

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 4

Forks: 1

Open Issues: 0

Type:symfony-bundle

v3.0.2 2022-08-03 18:08 UTC

README

A cron job manager for symfony console.

Installation

A simple bundle install. No extra stuff.

composer require padam87/cron-bundle

new Padam87\CronBundle\Padam87CronBundle(),

Configuration

padam87_cron:
  log_dir: %cron_log_dir%
  variables:
    mailto: %cron_mailto%
    any_other_variable_you_might_need: 'some_value'

Usage (v3)

Please note that v2 versions of this bundle still support annotations.

Commands

  • cron:dump dumps the cronfile
  • cron:import dumps the cronfile to the temp dir, and imports it

Basic

#[Job(minute: '5', hour: '0')]
class MyCommand extends Command

Groups

#[Job(minute: '5',hour: '0', group: 'master')]
class MyCommand extends Command

Output file

#[Job(minute: '5', hour: '0', logFile: 'my-command.log')]
class MyCommand extends Command