2021-04-02 19:48:41 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
2024-03-23 04:51:59 +08:00
|
|
|
use App\Jobs\CheckCleanup;
|
2024-07-04 03:21:53 +08:00
|
|
|
use App\Jobs\CheckQueueFailedJobs;
|
2024-11-17 02:44:41 +08:00
|
|
|
use App\Jobs\MaintainPluginState;
|
|
|
|
|
use App\Jobs\ManagePlugin;
|
2026-01-30 15:03:52 +07:00
|
|
|
use App\Jobs\RemoveUserDonorStatus;
|
|
|
|
|
use App\Jobs\RemoveUserVipStatus;
|
|
|
|
|
use App\Jobs\RemoveUserWarning;
|
2025-10-14 14:54:44 +07:00
|
|
|
use App\Jobs\SaveIpLogCacheToDB;
|
2025-05-11 02:33:22 +07:00
|
|
|
use App\Jobs\UpdateIsSeedBoxFromUserRecordsCache;
|
2024-11-03 15:29:21 +08:00
|
|
|
use App\Utils\ThirdPartyJob;
|
2022-05-06 15:50:26 +08:00
|
|
|
use Carbon\Carbon;
|
2024-07-04 03:21:53 +08:00
|
|
|
use Illuminate\Console\Scheduling\Event;
|
2021-04-02 19:48:41 +08:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
2025-04-28 20:21:32 +07:00
|
|
|
use Illuminate\Support\Facades\Schema;
|
2025-05-17 15:14:55 +07:00
|
|
|
use Nexus\Database\NexusDB;
|
2021-04-02 19:48:41 +08:00
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The Artisan commands provided by your application.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $commands = [
|
|
|
|
|
//
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
|
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
|
{
|
2024-12-25 22:30:55 +08:00
|
|
|
$schedule->command('cache:prune-stale-tags')->hourly();
|
2025-05-19 13:18:47 +07:00
|
|
|
$schedule->command('exam:assign_cronjob')->everyMinute();
|
|
|
|
|
$schedule->command('exam:checkout_cronjob')->everyFiveMinutes();
|
|
|
|
|
$schedule->command('exam:update_progress --bulk=1')->hourly();
|
|
|
|
|
$schedule->command('backup:cronjob')->everyMinute();
|
|
|
|
|
$schedule->command('hr:update_status')->everyTenMinutes();
|
|
|
|
|
$schedule->command('hr:update_status --ignore_time=1')->hourly();
|
|
|
|
|
$schedule->command('user:delete_expired_token')->dailyAt('04:00');
|
2022-06-01 13:15:55 +08:00
|
|
|
$schedule->command('claim:settle')->hourly()->when(function () {
|
|
|
|
|
return Carbon::now()->format('d') == '01';
|
2025-05-19 13:18:47 +07:00
|
|
|
});
|
|
|
|
|
$schedule->command('meilisearch:import')->weeklyOn(1, "03:00");
|
|
|
|
|
$schedule->command('torrent:load_pieces_hash')->dailyAt("01:00");
|
|
|
|
|
$schedule->job(new CheckQueueFailedJobs())->everySixHours();
|
|
|
|
|
$schedule->job(new MaintainPluginState())->everyMinute();
|
|
|
|
|
$schedule->job(new UpdateIsSeedBoxFromUserRecordsCache())->everySixHours();
|
|
|
|
|
$schedule->job(new CheckCleanup())->everyFifteenMinutes();
|
2025-10-14 14:54:44 +07:00
|
|
|
$schedule->job(new SaveIpLogCacheToDB())->hourly();
|
2026-01-30 15:03:52 +07:00
|
|
|
$schedule->job(new RemoveUserWarning())->everyTwentySeconds();
|
|
|
|
|
$schedule->job(new RemoveUserVipStatus())->everyMinute();
|
|
|
|
|
$schedule->job(new RemoveUserDonorStatus())->everyMinute();
|
2024-03-23 04:51:59 +08:00
|
|
|
|
2021-04-02 19:48:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function commands()
|
|
|
|
|
{
|
|
|
|
|
$this->load(__DIR__.'/Commands');
|
|
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
2024-03-23 04:51:59 +08:00
|
|
|
|
2021-04-02 19:48:41 +08:00
|
|
|
}
|