job(new VersionCheck)->daily(); $schedule->job(new DiskCleanup)->daily()->withoutOverlapping(); $schedule->job(new ReminderJob)->hourly()->withoutOverlapping(); $schedule->job(new QueueSize)->everyFiveMinutes()->withoutOverlapping(); $schedule->job(new CompanySizeCheck)->daily()->withoutOverlapping(); $schedule->job(new UpdateExchangeRates)->daily()->withoutOverlapping(); $schedule->job(new SubscriptionCron)->daily()->withoutOverlapping(); $schedule->job(new RecurringInvoicesCron)->hourly()->withoutOverlapping(); $schedule->job(new RecurringExpensesCron)->dailyAt('00:10')->withoutOverlapping(); $schedule->job(new AutoBillCron)->dailyAt('06:00')->withoutOverlapping(); $schedule->job(new SchedulerCheck)->daily()->withoutOverlapping(); $schedule->job(new TaskScheduler())->daily()->withoutOverlapping(); $schedule->job(new SystemMaintenance)->weekly()->withoutOverlapping(); if (Ninja::isSelfHost()) { $schedule->call(function () { Account::whereNotNull('id')->update(['is_scheduler_running' => true]); })->everyFiveMinutes(); } /* Run hosted specific jobs */ if (Ninja::isHosted()) { $schedule->job(new AdjustEmailQuota)->dailyAt('23:30')->withoutOverlapping(); $schedule->job(new SendFailedEmails)->daily()->withoutOverlapping(); $schedule->command('ninja:check-data --database=db-ninja-01')->daily('02:00')->withoutOverlapping(); $schedule->command('ninja:check-data --database=db-ninja-02')->dailyAt('02:05')->withoutOverlapping(); $schedule->command('ninja:s3-cleanup')->dailyAt('23:15')->withoutOverlapping(); } if (config('queue.default') == 'database' && Ninja::isSelfHost() && config('ninja.internal_queue_enabled') && ! config('ninja.is_docker')) { $schedule->command('queue:work database --stop-when-empty --memory=256')->everyMinute()->withoutOverlapping(); $schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping(); } } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }