Files
backend/app/Console/Kernel.php
2025-10-18 09:22:18 +03:30

65 lines
2.0 KiB
PHP
Executable File

<?php
namespace App\Console;
use App\Console\Commands\ManageDataTelescopeCommand;
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 = [
'App\Console\Commands\RoadObservationProblems', //// road observed webservice from 141 sawaneh
'App\Console\Commands\SendContractSmsNotification', //// road observed webservice from 141 sawaneh
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('webservice:roadobserved')
->everyTenMinutes()->appendOutputTo(storage_path('logs/nikarayan.log'));
$schedule->command('command:sendcontractsmsnotification')
->dailyAt('10:00')->appendOutputTo(storage_path('logs/contractSms.log'));
$schedule->command('reports:rms-summary')
->dailyAt('00:00')->appendOutputTo(storage_path('logs/report_summary.log'));
$schedule->command("webservice:roadobserved --daily-mode")
->dailyAt('00:05')->appendOutputTo(storage_path('logs/nikarayan.log'));
$schedule->command("webservice:roadobserved --daily-mode")
->dailyAt('00:45')->appendOutputTo(storage_path('logs/nikarayan.log'));
$schedule->command("db:backup")
->weekly()->at('03:00')->appendOutputTo(storage_path('logs/mariadb-backup.log'));
$schedule->command('telescope:prune --hours=48')
->dailyAt('04:00')
->appendOutputTo(storage_path('logs/telescope.log'));
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}