41 lines
859 B
PHP
41 lines
859 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\ServiceSIMBG;
|
|
use Illuminate\Console\Command;
|
|
use \Illuminate\Support\Facades\Log;
|
|
|
|
class ExecuteScraping extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'app:execute-scraping';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Execure scraping service daily every 12 pm';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
|
|
private $service_simbg;
|
|
|
|
public function __construct(ServiceSIMBG $service_simbg){
|
|
$this->service_simbg = $service_simbg;
|
|
parent::__construct();
|
|
}
|
|
public function handle()
|
|
{
|
|
Log::info("running scheduler daily scraping");
|
|
$this->service_simbg->syncTaskList();
|
|
}
|
|
}
|