- What is skrip42/cron-bundle used for?
- It is a Symfony bundle for defining recurring scheduled tasks inside your application and running them through Symfony's console. This lets you manage routine background work from application code instead of maintaining a separate system crontab entry for every job. It targets Symfony projects, not Laravel.
- How do I install skrip42/cron-bundle?
- Install it with Composer using composer require skrip42/cron-bundle, then register the bundle in config/bundles.php if Symfony Flex does not do it automatically. Check the repository README and composer.json for the supported version constraint and any required configuration. You need a Symfony application with the console component available.
- Is skrip42/cron-bundle compatible with Laravel?
- No. It is built as a Symfony bundle and depends on Symfony's bundle registration and console, so it is not a drop-in package for a Laravel application. Laravel developers should use the framework's built-in task scheduler instead, which already handles cron expression definitions and a single system cron entry.
- Does this bundle replace system cron entirely?
- It lets you define and run scheduled jobs from your application code via the Symfony console, which removes the need for many hand-written crontab lines. In most deployments you still trigger the runner from one system cron entry or a supervised long-running process on the server. The bundle handles job definitions, not the operating system scheduling layer itself.
- How do I define a cron job with skrip42/cron-bundle?
- Jobs are configured inside your Symfony application and executed through the console, following the bundle's documented configuration approach. Because the repository README was not included in this context, verify the exact format (attributes, YAML, or service tags) in the package documentation before implementing. Keeping job logic in dedicated services makes the definitions easier to test and reuse.
- Which Symfony versions does skrip42/cron-bundle support?
- The supported Symfony versions depend on the Composer constraints in the release you install, and those constraints were not provided in this context. Run composer require skrip42/cron-bundle and inspect the resolved version and its composer.json requirements before adopting it. If you are on an older Symfony release, you may need an earlier tagged version of the bundle.
- How can I test cron jobs defined with this bundle?
- Because jobs run through Symfony console commands, you can exercise them with Symfony's CommandTester or by booting the kernel in a KernelTestCase. Keep the actual job logic in standalone services so it can be unit tested without the scheduling wrapper. This also makes it easier to assert exit codes and output in functional tests.
- Is skrip42/cron-bundle safe to use in production?
- It is a small Composer package, so review the repository's recent commits, open issues, and tagged releases before relying on it for unattended jobs. Pin the version in composer.lock and run the console runner under a process supervisor or a single system cron entry. Add logging and failure alerts around your jobs, since scheduled tasks can fail silently.
- What are alternatives to skrip42/cron-bundle?
- For modern Symfony applications, the built-in Symfony Scheduler component (Symfony 6.3 and later) covers recurring tasks without a third-party bundle. Other options include combining a cron expression library such as dragonmantank/cron-expression with your own console command, or using a single system crontab entry to call a runner. Laravel developers have the framework's own scheduler as the natural choice.
- Is skrip42/cron-bundle actively maintained?
- Maintenance status is not stated in the provided context, so check the GitHub repository for recent commits, release tags, and issue response times. Because scheduled job code runs unattended, prefer a package with recent activity or be prepared to fork and maintain it yourself. Also confirm the license and contribution guidelines before depending on it long term.