Files
movies/routes/console.php
T

23 lines
935 B
PHP
Raw Normal View History

2024-12-29 16:36:49 +02:00
<?php
2024-12-30 18:28:50 +02:00
use App\Console\Commands\ItemProcessing\FetchItemDataCommand;
2024-12-30 01:51:28 +02:00
use App\Console\Commands\TmdbFetch\FetchExportCommand;
2024-12-30 18:28:50 +02:00
use App\Console\Commands\TmdbFetch\FetchExportItemsCommand;
2024-12-29 16:36:49 +02:00
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
2024-12-30 01:51:28 +02:00
use Illuminate\Support\Facades\Schedule;
2024-12-29 16:36:49 +02:00
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote')->hourly();
2024-12-30 01:51:28 +02:00
// fetch export every week, saturday at 8 and 9
Schedule::command(FetchExportCommand::class, ['type', 'movies'])->weeklyOn(6, '8:00');
Schedule::command(FetchExportCommand::class, ['type', 'tv_series'])->weeklyOn(6, '9:00');
2024-12-30 18:28:50 +02:00
Schedule::command(FetchExportItemsCommand::class, ['type', 'movie'])->twiceDaily(17,19);
Schedule::command(FetchExportItemsCommand::class, ['type', 'tv_series'])->twiceDaily(17,19);
// fetch items data
Schedule::command(FetchItemDataCommand::class)->twiceDaily(18,20);