imper86/jobby-cron-bundle
A Symfony bundle that integrates the Jobby cron manager, letting you define and schedule cron jobs in application configuration, run them from a single crontab entry, and keep job definitions versioned with your code.
composer require imper86/jobby-cron-bundle you must add the bundle class to config/bundles.php yourself (Imper86\JobbyCronBundle\Imper86JobbyCronBundle::class => ['all' => true] — confirm the exact FQCN from composer show / src/).src/DependencyInjection/Configuration.php (the config tree and every supported job key), src/DependencyInjection/*Extension.php (service IDs and aliases), and src/Command/* (the console command name and its arguments). These are the only reliable docs — the README is thin and the package is lightly maintained.bin/console list | grep -i jobby rather than guessing.config/packages/jobby_cron.yaml with one job, then replace the crontab entry with a single line:
* * * * * cd /path/to/app && php bin/console <jobby-command> >> var/log/jobby.log 2>&1
Jobby reads the cron expression itself, so every job runs through that one entry point.jobby_cron:
jobs:
nightly_import:
command: 'php bin/console app:import --env=prod'
schedule: '0 3 * * *'
output: '%kernel.project_dir%/var/log/import.log'
enabled: true
maxRuntime: 1800
email: '[email protected]'
Verify each key against Configuration.php before relying on it — the bundle may rename or nest jobs.command at bin/console app:whatever so the job reuses your DI container, DB connections, and mailer. Prefer this over raw shell scripts; you keep testability and logging.--job=<name> (or positional). Use this in deploy hooks and for manual runs without triggering every job.Jobby\Jobby service, call add() before run(), and let the bundle handle the rest. This is the extension seam when YAML isn't expressive enough.output to a file under var/log/ and let Symfony's Monolog handle rotation, rather than relying on cron email. Keep alerting (email) separate from output capture.composer.json, audit the command and extension classes once, and be prepared to fork. Don't assume Symfony 7 compatibility — check composer.json constraints.php may not be on PATH, APP_ENV won't be dev, and the working directory is whatever cron gives you. Always cd into the project and use absolute paths for bin/console, lockfiles, and output.date.timezone explicitly in the CLI php.ini if schedules look shifted.maxRuntime kills blindly. Fine for batch imports; dangerous if a job is a queue worker or holds a transaction. Set generously or omit.output and keep command quiet.jobby_cron.yaml.-vvv, check var/log/ for both the job output and Symfony logs, and verify the schedule parses (a malformed cron expression can silently disable a job).How can I help you explore Laravel packages today?