<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use App\Models\StrategyTask;
use App\Service\StrategyService;
//use App\Http\Controllers\Tool;

class CreatedTaskCommand extends Command
{
    //use Tool;
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:CreatedTaskCommand';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '每天早上6点创建任务';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $StrategyService = new StrategyService();
        $StrategyService->createdTask();
        
        $StrategyService->createdTask(); //对失败数据重试3次，没有失败数据直接返回
        
        $StrategyService->createdTask();
        
        $StrategyService->createdTask();        
    }
    
}
