File: /var/www/ipsremont-demo/app/Console/Kernel.php
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected $commands = [
//
];
protected function schedule(Schedule $schedule)
{
// Очередь jobs
$schedule->command('queue:work --stop-when-empty')->everyMinute()->withoutOverlapping()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_queue_work.log'));
// Очищает папку /app/public/import
$schedule->command('deleteImport')->withoutOverlapping()->daily()->appendOutputTo(storage_path('logs/deleteImport.log'));
// Очистка мусора
$schedule->command('repair-attachment:clean')->withoutOverlapping()->daily()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_repair_attachment_clear.log'));
// Обновление статусов заявки
$schedule->command('orders1c:integrate')->hourly()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_orders1c_integrate.log'));
// «Обмен ТМЦ – детали»
// $schedule->command('import:parts')->hourly()->appendOutputTo(storage_path('logs/import_parts.log'));
$schedule->command('import:details')->hourly()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_details.log'));
// «Обмен ТМЦ - аппараты»
$schedule->command('import:devices')->hourly()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_devices.log'));
// «Обмен документ: Заявки покупателей»
$schedule->command('import:orders')->everyThirtyMinutes()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_orders.log'));
// «Обмен справочник: Контрагенты» (не нужно)
// $schedule->command('import:services')->hourly()->appendOutputTo(storage_path('logs/import_services.log'));
// «Обмен справочник: Подразделения» (не нужно)
// $schedule->command('import:branches')->hourly()->appendOutputTo(storage_path('logs/import_branches.log'));
// «Обмен документ: Работа со сторонними центрами»
$schedule->command('export:repair-report')->withoutOverlapping()->everyMinute()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_export:repair-report.log'));
// «Обмен документ: Расходная накладная»
$schedule->command('import:get-in-payment-order')->hourly()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_get-in-payment-order.log'));
// «Обмен документ: Платежное поручение исходящее»
$schedule->command('import:get-out-payment-order')->hourly()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_get-out-payment-order.log'));
// «Обмен документ: Платежное поручение входящее»
$schedule->command('import:sales-receipt')->hourly()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_sales-receipt.log'));
// Синхронизация изображений
$schedule->command('import:images')->daily()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_import_images.log'));
// Обновление статусов отгрузок
$schedule->command('dpd:integrate')->everyFiveMinutes()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_shipment_dpd_integrate.log'));
$schedule->command('sdek:integrate')->everyFiveMinutes()->appendOutputTo(storage_path('logs/' . date('Y-m-d') . '_shipment_sdek_integrate.log'));
}
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}