<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 功能強大 支持多語言、二開方便! 廣告
                參考:https://learnku.com/docs/laravel/6.x/scheduling/5169#introduction [TOC] ### 一、任務調度不生效 文檔中的例子,是先要用crontab定義每分鐘執行artisan schedule:run 命令 出現了手動執行成功,但是crontab自動執行不生效的問題,最后解決: 原因是crontab不識別環境變量 也就不識別php命令 把php換成whereis php 返回的全路徑就行了 ### 二、配置全在Kernel文件中,不好維護 ``` /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { # 使用份文件的形式配置,避免代碼提交沖突。也方便按業務分類或分工管理配置 \App\Task\Amazon\AutoTask::run($schedule); \App\Task\Shopee\AutoTask::run($schedule); } ``` ``` <?php namespace App\Logic\Amazon; use Illuminate\Console\Scheduling\Schedule; use App\Tool\RequestUtil; class AutoTask { public static function run(Schedule $schedule){ # 商品列表,包含了FBM商品庫存 $schedule->call(function () { $port = env('AUTO_JOB_PORT'); $requestUtil = new RequestUtil(); $preUrl = 'http://127.0.0.1:'.$port.'/'; $taskUrl = $preUrl . "product/make_down_item_list_task?platform=amazon"; $requestUtil->toSocket($taskUrl); })->everyMinute(); # 訂單列表 $schedule->call(function () { $port = env('AUTO_JOB_PORT'); $requestUtil = new RequestUtil(); $preUrl = 'http://127.0.0.1:'.$port.'/'; $taskUrl = $preUrl . "order/make_down_order_list_task?platform=amazon"; $requestUtil->toSocket($taskUrl); })->everyMinute(); ...其他配置 } } ``` ### 三、No scheduled commands are ready to run.
                  <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>

                              哎呀哎呀视频在线观看