allprogrammic/ resque-bundle
Symfony ResqueBundle
v1.0.0
2020-08-18 08:15 UTC
Requires
- php: ^5.5.9 || ^7.0
- ext-redis: *
- allprogrammic/redis-client: 1.0.x-dev
- allprogrammic/resque: 1.0.x-dev
- symfony/framework-bundle: ^2.7 || ^3.0 || ^4.0
- symfony/swiftmailer-bundle: ^3.0
- symfony/templating: ^2.7 || ^3.0 || ^4.0
- symfony/twig-bundle: ^2.7 || ^3.0 || ^4.0
- twig/twig: ^1.28 || ^2.0
This package is auto-updated.
Last update: 2024-09-08 15:36:01 UTC
README
重复任务
配置
您可以通过定义一个专用的配置文件来设置重复任务,如下所示:
tasks_name: cron: "*/5 * * * *" (cron format) class: ~ queue: ~ args: ~ description: ~
警报
请记住包含并配置SwiftmailerBundle以使用警报。
public function registerBundles() { $bundles = array( // ... new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), ); // ... }
执行
为了设置您的重复任务,您只需要在调用resque:recurring
命令时指定要使用的文件,如下所示:
resque:recurring [le_chemin_de_votre_fichier_de_configuration]
cron表达式
* * * * * - - - - - | | | | +----- day of week (0 - 7) (Sunday=0 or 7) | | | +---------- month (1 - 12) | | +--------------- day of month (1 - 31) | +-------------------- hour (0 - 23) +------------------------- min (0 - 59)