Download the PHP package xactsystems/command-scheduler without Composer
On this page you can find all versions of the php package xactsystems/command-scheduler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xactsystems/command-scheduler
More information about xactsystems/command-scheduler
Files in xactsystems/command-scheduler
Package command-scheduler
Short Description A Symfony command scheduler.
License MIT
Informations about the package command-scheduler
XactCommandScheduler
This bundle allows you to provide job scheduling via a list of jobs configured within a DBAL store.
Jobs can be created for once-only jobs as well as repeating jobs based on a cron expression. The bundle features an admin interface for management of the scheduled commands as well as via the CommandScheduler class.
Documentation
1) Add XactCommandScheduler to your project
2) Create the scheduler table
3) Add the routes for the scheduler admin views
config/routes.yaml
4) Use the admin views
Browse to http://my-project/command-scheduler/list
5) Run the command scheduler
The command accepts the following options:
--max-runtime=nnn
Sets the maximum length in seconds the scheduler will run for. 0 (default) runs forever.--idle-time=nnn
Sets the number of seconds the scheduler sleeps for when the command queue is empty. Defaults to 5.
Manage the scheduler via code
Add a scheduled command
Disable a command
Run a command immediately
Delete a command
Get a list of active commands
Creating commands via the CommandSchedulerFactory
When using the factory, you can set the the configuration values for the following command settings:
You can then use the factory methods to create your scheduled commands. The configured parameters above will be set on commands created via factory methods unless overwritten in the method calls:
Factory methods:
Cron notes
The bundle uses dragonmantank/cron-expression CronExpression class to determine run times and you can use the non-standard pre-defined scheduling definitions. See Cron Format for more details.
Credits
- Ian Foulds as the creator of this package.
- Piotr Nowak (https://github.com/noofaq) for inspiration when trying to find a replacement for jms/job-queue-bundle - https://github.com/schmittjoh/JMSJobQueueBundle/issues/208#issuecomment-393069592.
- Julien Guyon (https://github.com/j-guyon) for inspiration with his command scheduler bundle.
License
This bundle is released under the MIT license. See the complete license in the bundle:
All versions of command-scheduler with dependencies
doctrine/doctrine-bundle Version ^2.12
doctrine/orm Version ^3.2
symfony/asset Version ^6.4||^7.1
symfony/form Version ^6.4||^7.1
symfony/process Version ^6.4||^7.1
symfony/twig-bundle Version ^6.4||^7.1
symfony/yaml Version *
dragonmantank/cron-expression Version ^3.3
xactsystems/cast Version ^1.0
williarin/cook Version ^1.3