Files
backend/app/Console/Kernel.php

59 lines
1.8 KiB
PHP
Executable File

<?php
namespace App\Console;
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'));
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}