RegisterMessenger.php 657 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare (strict_types=1);
  3. namespace app\command;
  4. use think\console\Command;
  5. use think\console\Input;
  6. use think\console\input\Argument;
  7. use think\console\input\Option;
  8. use think\console\Output;
  9. use think\facade\Db;
  10. /**
  11. * 注册短信提醒后台审核
  12. */
  13. class RegisterMessenger extends Command {
  14. protected function configure() {
  15. // 指令配置
  16. $this->setName('RegisterMessenger')
  17. ->setDescription('Auto send msg');
  18. }
  19. protected function execute(Input $input, Output $output) {
  20. //短信加入队列
  21. queue("app\job\Messenger", ["type" => "msg", "msg" => 777, "status" => 1]);
  22. }
  23. }