<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                - 1.寫一個要執行的時間woker,繼承TimeWorkerBase ~~~ <?php /** * @Author: 陳靜 * @Date: 2018/05/08 20:24:43 * @Description: */ namespace app\worker\controller; use app\index\controller\Send; use think\Log; class TestTimeWorker extends TimeWorkerBase { //這是繼承過后要執行的方法 /** * @Author: 陳靜 * @Date: 2018/05/09 22:27:48 * @Description: * @param $data 要執行的數據 */ public function runHandle($data) { Log::notice( "測試".date('Y-m-d H:i:s') ); //發送短信方法 (new Send())->sendMsg(); } } ~~~ - 2. 寫一個命令循環執行 ~~~ <?php /** * @Author: 陳靜 * @Date: 2018/04/18 22:13:03 * @Description: */ namespace app\console; use app\base\controller\Redis; use app\worker\controller\WorkerCommandBase; use think\Config; use think\console\Input; use think\console\Output; use think\Exception; use think\Log; /** * Created by PhpStorm. * Power by Mikkle * QQ:776329498 * Date: 2017/6/12 * Time: 15:07 */ class Task extends WorkerCommandBase { protected function configure() { $this->setName('task:queue')->setDescription('Here is the task\'s command '); } } ~~~ - 3. 一個Test調用添加執行的值 ~~~ <?php /** * @Author: 陳靜 * @Date: 2018/05/08 23:06:08 * @Description: */ namespace app\worker\controller; class Test { public function addtest() { TestTimeWorker::add(['name' => 'test1'],strtotime('2018-05-09 22:55:00')); } } ~~~ - 執行順序 1.開啟命令 `php think task:queue` ![](https://box.kancloud.cn/c813b2f6ca85f2ec358cdb38e0699892_538x178.png) 2.執行添加數據 直接瀏覽器運行 ,或者你自己的方式添加 ![](https://box.kancloud.cn/4cab8ef733612172f02232837346cca6_629x128.png) 3.等待執行 到了指定時間就執行了 ![](https://box.kancloud.cn/47679b1fd058105bc7e35bfd4561cf92_489x468.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看