68 lines
2.0 KiB
PHP
68 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Console;
|
|
|
|
use App\Console\Commands\ScrapeMihaaruCommand;
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
class Kernel extends ConsoleKernel
|
|
{
|
|
/**
|
|
* The Artisan commands provided by your application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $commands = [
|
|
ScrapeMihaaruCommand::class
|
|
];
|
|
|
|
/**
|
|
* Define the application's command schedule.
|
|
*
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
* @return void
|
|
*/
|
|
protected function schedule(Schedule $schedule)
|
|
{
|
|
$schedule->command('scrape:mihaaru')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/mihaaru");
|
|
|
|
$schedule->command('scrape:sun')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/sun");
|
|
|
|
$schedule->command('scrape:avas')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/avas");
|
|
|
|
$schedule->command('scrape:dhuvas')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/dhuvas");
|
|
|
|
$schedule->command('scrape:thiladhun')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/thiladhun");
|
|
|
|
$schedule->command('scrape:thepress')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/thepress");
|
|
|
|
$schedule->command('scrape:addulive')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/addulive");
|
|
|
|
$schedule->command('scrape:voice')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/voice");
|
|
|
|
$schedule->command('scrape:dhen')->everyFiveMinutes()
|
|
->pingOnSuccess(env('APP_URL')."/api/ping/dhen");
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands()
|
|
{
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|