Download the PHP package halloverden/symfony-scheduled-task-bundle without Composer
On this page you can find all versions of the php package halloverden/symfony-scheduled-task-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package symfony-scheduled-task-bundle
Scheduled Task Bundle
The Scheduled Task Bundle provides a way to implement cron jobs in your Symfony application, making use of the messenger component to execute the jobs either synchronously or asynchronously.
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
Usage
-
Route your messages to the transports by defining your own messenger logic in your
config/packages/messenger.yaml
file. For example, seeResources/config/hallo_verden_scheduler.yaml
: - Make sure all the transports you want to use are configured under
transports:
in yourconfig/packages/messenger.yaml
file. For example, seeResources/config/hallo_verden_scheduler.yaml
:
N.B. Enabling the failure_transport
is recommended.
-
Create a Task class that implements the
AsyncTaskInterface
or theSyncTaskInterface
and define the schedule and the name for the Task: - Create a TaskHandler class for your task which will need to define an
__invoke(Taskclass $task)
method:
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
All versions of symfony-scheduled-task-bundle with dependencies
symfony/http-kernel Version ^5.4|^6.1
symfony/dependency-injection Version ^5.4|^6.1
symfony/config Version ^5.4|^6.1
symfony/console Version ^5.4|^6.1
symfony/messenger Version ^5.4|^6.1
symfony/yaml Version ^5.4|^6.1
dragonmantank/cron-expression Version ^2.2
nesbot/carbon Version ^2.1