padam87/cron-bundle

A cron job manager for symfony console.

Installs: 48 223

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 4

Forks: 1

Open Issues: 0

Type:symfony-bundle

v3.1.0 2024-08-28 21:11 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