105 lines
3.4 KiB
PHP
105 lines
3.4 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()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/mihaaru");
|
|
|
|
$schedule->command('scrape:sun')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/sun");
|
|
|
|
$schedule->command('scrape:avas')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/avas");
|
|
|
|
$schedule->command('scrape:dhuvas')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/dhuvas");
|
|
|
|
$schedule->command('scrape:thiladhun')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/thiladhun");
|
|
|
|
$schedule->command('scrape:thepress')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/thepress");
|
|
|
|
$schedule->command('scrape:addulive')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/addulive");
|
|
|
|
$schedule->command('scrape:voice')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/voice");
|
|
|
|
$schedule->command('scrape:dhen')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/dhen");
|
|
|
|
$schedule->command('scrape:psm')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/psm");
|
|
|
|
$schedule->command('scrape:oneonline')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/oneonline");
|
|
|
|
$schedule->command('scrape:feshun')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/feshun");
|
|
|
|
$schedule->command('scrape:miadhu')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/miadhu");
|
|
|
|
$schedule->command('scrape:vnews')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/vnews");
|
|
|
|
$schedule->command('scrape:hama')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/hama");
|
|
|
|
$schedule->command('scrape:raajjemv')->everyFiveMinutes()
|
|
->runInBackground()
|
|
->pingOnSuccess(env('APP_URL') . "/api/ping/raajjemv");
|
|
}
|
|
|
|
/**
|
|
* Register the commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands()
|
|
{
|
|
$this->load(__DIR__ . '/Commands');
|
|
|
|
require base_path('routes/console.php');
|
|
}
|
|
}
|