ctrlpanel/app/Console/Kernel.php

41 lines
1 KiB
PHP
Raw Normal View History

2021-06-05 09:26:32 +00:00
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Support\Facades\Storage;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
2021-06-05 09:26:32 +00:00
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('credits:charge')->hourly();
2023-01-13 17:57:35 +00:00
$schedule->command('cp:versioncheck:get')->daily();
2023-02-02 22:21:52 +00:00
$schedule->command('payments:open:clear')->daily();
2021-06-05 09:26:32 +00:00
//log cronjob activity
$schedule->call(function () {
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - ' . now());
2021-06-05 09:26:32 +00:00
})->everyMinute();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
2021-06-05 09:26:32 +00:00
require base_path('routes/console.php');
}
}