Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Cron Bundle

Cron Bundle Laravel Package

padam87/cron-bundle

Symfony bundle for defining and running cron jobs as annotated services. Schedule tasks with a simple @Cron annotation, prevent overlapping runs with locks, and execute jobs via a console command, keeping scheduled work organized, logged, and easy to test inside your Symfony app.

View on GitHub
Deep Wiki
Context7

padam87/cron-bundle is a Symfony bundle that adds database-backed cron job management to your application. Define jobs declaratively with the @CronJob annotation, and the bundle persists them as Doctrine entities, evaluates their cron expressions, and executes due jobs through a single console command—no crontab editing required.

  • Annotation-driven job definitions
  • Doctrine storage for jobs and run history
  • Full cron expression support
  • One console command runs all due jobs
  • Configurable logging of executions and errors
Frequently asked questions about Cron Bundle
Can I use padam87/cron-bundle in a Laravel application?
No, not as a normal Composer dependency. It is a Symfony FrameworkBundle bundle that expects a Symfony kernel, bundle registration in config/bundles.php, and console commands discovered through Symfony's DI container. Laravel has no equivalent bundle registration contract, so there is no install-and-go path. You could boot a Symfony console application alongside Laravel, but you would be maintaining a second container for no product gain.
What does padam87/cron-bundle actually do?
It lets you declare scheduled console commands in Symfony configuration and then render or write the corresponding crontab lines for the host. Jobs are registered centrally, so recurring tasks live in one place instead of being scattered across server crontabs. The distinguishing feature is programmatic crontab installation, not job scheduling itself.
How does padam87/cron-bundle compare to Laravel's built-in scheduler?
The overlap is almost total. Laravel already handles this with Schedule::command() in routes/console.php plus a single '* * * * * php artisan schedule:run' crontab entry, and it adds withoutOverlapping(), onOneServer(), and cache-based locks for free. The only thing the bundle offers beyond that is dumping and writing crontab lines programmatically. In most Laravel deployments that capability is a liability rather than a feature.
How do I install and configure padam87/cron-bundle?
You would run 'composer require padam87/cron-bundle', register the bundle in config/bundles.php, and declare your jobs in Symfony bundle configuration. There is no Laravel service provider or package auto-discovery, and the console commands are resolved through Symfony's container. In a Laravel context that means hand-wiring a separate Symfony kernel and configuration loader.
Which Laravel, PHP, and Symfony versions does it support?
It is built against Symfony, so its version constraints cover Symfony 5, 6, and 7 with PHP 8.x, and those constraints should be verified against your target runtime before you commit. There are no Laravel version constraints because it is not a Laravel package. Note also that annotation-based job definitions are deprecated in favour of PHP attributes, so older documentation in the repository may describe a dead API.
Is writing to the host crontab safe in Docker, Kubernetes, or ECS?
Generally no. Containers, ECS, Kubernetes, and most PaaS runtimes either have no cron daemon, no write access to the host crontab, or both, so crontab mutation is effectively disqualified there. Even on a VM, mutating the host crontab is stateful, host-local, and irreversible by default. If your answer to 'where does this run' involves managed compute, use Laravel's scheduler or a platform-native scheduler such as EventBridge or Cloud Scheduler instead.
Does padam87/cron-bundle safely escape the shell commands it writes to crontab?
The package shells out to crontab and renders command strings from declared job definitions, so quoting and escaping are the critical security surface. Before adopting it in any form, audit how job definitions are interpolated and confirm that a job definition cannot inject arbitrary shell. If you fork the rendering logic, make escaping a first-class concern rather than a string-concatenation afterthought.
What should I use instead for scheduled tasks in Laravel?
Use Laravel's first-party scheduler: define tasks with Schedule::command() in routes/console.php, add one 'php artisan schedule:run' crontab entry, and wrap tasks in withoutOverlapping() plus a cache lock for distributed safety. For containerised or multi-node deployments, use onOneServer() or delegate to a queue job. If you genuinely need crontab rendering outside Laravel, run padam87/cron-bundle as an isolated standalone Symfony console app or sidecar and couple it only through the CLI commands it invokes.
Is padam87/cron-bundle actively maintained and production-ready?
Treat it as unproven: roughly 11 stars and zero dependents means effectively no community validation and no battle-tested edge cases. It is a single-maintainer project, so abandonment is the base case rather than the tail risk, and you should assume you own the code from day one. There is also no execution observability such as run history, success or failure telemetry, or alerting, so failures will be silent unless you add your own monitoring.
Can I fork padam87/cron-bundle or vendor part of it into an internal package?
Yes. The licence is MIT, so forking or vendoring a subset is legally unencumbered and is a reasonable exit ramp. The pragmatic option is to extract only the crontab-rendering logic into a small internal package if that specific capability is truly required. Do not fork the FrameworkBundle integration wholesale into a Laravel app; that path carries the maintenance burden without the payoff.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect