diff --git a/app/Console/Commands/CleanSendLog.php b/app/Console/Commands/CleanSendLog.php new file mode 100644 index 00000000..6deaa1f9 --- /dev/null +++ b/app/Console/Commands/CleanSendLog.php @@ -0,0 +1,46 @@ +modify(self::PERIOD))->delete(); + + $this->info('['.date('Y-m-d H:i:s').'] Deleted send logs: '.self::PERIOD); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4c6abe9a..9c28846f 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -54,6 +54,9 @@ class Kernel extends ConsoleKernel ->everyMinute() ->withoutOverlapping(); + $schedule->command('freescout:clean-send-log') + ->monthly(); + // Logs monitoring. $alert_logs_period = config('app.alert_logs_period'); if (config('app.alert_logs') && $alert_logs_period) {