File: /var/www/vhost/disk-apps/teamdemo.sports-crowd.com/app/Console/Kernel.php
<?php
namespace App\Console;
use App\AppSection;
use App\Http\Controllers\AcademyParameterController;
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 = [
//
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// Tareas boleteria
if (AppSection::where('active', true)->where('description', 'like', '%' . 'boleteria' . '%')->first()) {
$schedule->command('sportscrowd:inactivateTicketUserBlockBackups')->cron('55 23 * * *');
$schedule->command('sportscrowd:ticketHistoricalPayments')->daily();
// $schedule->command('sportscrowd:symbolicTicketPayments')->everyThirtyMinutes();
$schedule->command('sportscrowd:ticketPayments')->everyFifteenMinutes();
$schedule->command('sportscrowd:ticketMails')->hourly();
$schedule->command('sportscrowd:blockSeats')->everyMinute();
}
// Tareas tienda
if (AppSection::where('active', true)->where('description', 'like', '%' . 'tienda' . '%')->first()) {
$schedule->command('sportscrowd:batchpco')->cron('55 23 * * *');
$schedule->command('sportscrowd:woocommerce')->daily();
$schedule->command('sportscrowd:shopify')->twiceDaily(12, 23);
$schedule->command('sportscrowd:orderHistoricalPayments')->daily();
$schedule->command('sportscrowd:orderPayments')->everyThirtyMinutes();
// $schedule->command('sportscrowd:orderMails')->everyThirtyMinutes();
}
// Tareas academias
if (AppSection::where('active', true)->where('description', 'like', '%' . 'academia' . '%')->first()) {
$schedule->command('sportscrowd:academyProcessValidation')->daily();
$controller = new AcademyParameterController();
$cron = $controller->getSchedule($controller->getParametersSchedule('payment_activation_notification_schedule'));
$schedule->command('sportscrowd:createNextAcademyPayments')->cron($cron);
$schedule->command('sportscrowd:notifyAcademyPayments')->cron($cron);
$schedule->command('sportscrowd:registrationRenewal')->daily();
$schedule->command('sportscrowd:updateRegistrationStartDate')->daily();
$schedule->command('sportscrowd:academyStoreInventory')->daily();
$schedule->command('sportscrowd:updateAgeAcademyUsers')->daily();
}
// Tareas pagos generales
$schedule->command('sportscrowd:paymentHistoricalTransactions')->daily();
$schedule->command('sportscrowd:paymentTransactions')->everyThirtyMinutes();
// Validar eventos goles, tarjetas y partidos
// $schedule->command('sportscrowd:livescore')->everyMinute(); // TEMPORALMENTE DESHABILITADO MIENTRAS SE MEJOREN LA IDENTIFICACIÓN DE LOS EVENTOS DE LOS PARTIDOS
// Actualizar estadisticas de equipo
$schedule->command('sportscrowd:teamDataSync')->cron('55 23 * * *');
// Limpiar y archivar logs, notificaciones y system logs
$schedule->command('sportscrowd:markOldLogs')->daily();
$schedule->command('sportscrowd:archiveAndDeleteOldLogs')->lastDayOfMonth('23:59');
// Membresías expiradas
$schedule->command('sportscrowd:process-expired-memberships')->daily();
// Experiencias expiradas
$schedule->command('sportscrowd:process-expired-experiences')->everyMinute();
$schedule->command('sportscrowd:process-inactivate-experiences')->daily();
// Sincronizar ERP
$schedule->command('sportscrowd:erpSync')->twiceDaily(12, 23);
// Enviar mensajes de cumpleaños a las 10 AM todos los días
$schedule->command('sportscrowd:birthdayMessageAutomation')->dailyAt('10:15');
// Clear application cache daily
$schedule->command('cache:clear')->daily();
// Clear route cache daily
$schedule->command('route:clear')->daily();
// Clear config cache daily
$schedule->command('config:clear')->daily();
// Clear view cache daily
$schedule->command('view:clear')->daily();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}