draw / cron-bundle
This bundle allow cron configuration that can be dump into a compatible cron job file format.
Installs: 10 105
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- draw/tester: ^0.7.59
- symfony/config: ^4.4 || ^5.4
- symfony/console: ^4.4 || ^5.4
- symfony/dependency-injection: ^4.4 || ^5.4
Requires (Dev)
- phpunit/phpunit: ^8.0 || ^9.0
- dev-master / 0.8.x-dev
- 0.7.59
- 0.7.58
- 0.7.57
- 0.7.56
- 0.7.54
- 0.7.53
- v0.7.52
- v0.7.51
- v0.7.50
- v0.7.49
- v0.7.48
- v0.7.47
- v0.7.46
- v0.7.45
- v0.7.44
- v0.7.43
- v0.7.42
- v0.7.41
- v0.7.40
- v0.7.39
- v0.7.38
- v0.7.37
- v0.7.36
- v0.7.35
- v0.7.34
- v0.7.33
- v0.7.32
- v0.7.31
- v0.7.30
- v0.7.29
- v0.7.28
- v0.7.27
- v0.7.26
- v0.7.25
- v0.7.24
- v0.7.23
- v0.7.22
- 0.7.21
- v0.7.20
- v0.7.19
- v0.7.18
- v0.7.17
- v0.7.16
- v0.7.15
- v0.7.14
- v0.7.13
- v0.7.12
- v0.7.11
- v0.7.10
- v0.7.9
- v0.7.8
- v0.7.7
- v0.7.6
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.0
- v0.5.23
- 0.5.22
- v0.5.21
- v0.5.20
- v0.5.19
- v0.5.18
- v0.5.17
- v0.5.16
- v0.5.15
- v0.5.14
- v0.5.13
- v0.5.12
- v0.5.11
- v0.5.10
- v0.5.9
- v0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- dev-packages-git-actions
This package is auto-updated.
Last update: 2024-11-06 23:22:58 UTC
README
This bundle is use to configure cron job that can be dump into a compatible cron job file format. You can configure cron base on the environment configuration or a enabled setting.
This is mainly useful if you want to configure the cron in the project and during your deployment flow you call the command to dump the cron file with the proper environment configure.
This bundle does no intent to run the cron, it's just to allow a centralize configuration.
Configuration
Here is a sample of the configuration:
parameters: cron.console.execution: "www-data php %kernel.project_dir%/bin/console" cron.context.enabled: true draw_cron: jobs: acme_cron: description: "Execute acme:command every 5 minutes" command: "%cron.console.execution% acme:command" expression: "*/5 * * * *" output: ">/dev/null 2>&1" #This is the default value enabled: "%cron.context.enabled%"
This would output something like this:
#Description: Execute acme:command every 5 minutes
* * * * * www-data php /var/www/acme/bin/console acme:command >/dev/null 2>&1
Command
The command to dump the file is draw:cron:dump-to-file.
If you want to dump it the first time or in a new file path you can simply do this:
bin/console draw:cron:dump-to-file /path/to/the/file
It will throw a exception if the file already exists. If you want to override it simply add the --override option.
bin/console draw:cron:dump-to-file /path/to/the/file --override
Normally you should integrate this in you deployment pipeline