2017-01-30 21:40:43 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
2015-03-12 10:44:39 +10:00
|
|
|
|
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
2017-01-30 21:40:43 +02:00
|
|
|
use Utils;
|
2015-03-12 10:44:39 +10:00
|
|
|
|
2015-09-25 12:57:40 +03:00
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The Artisan commands provided by your application.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $commands = [
|
|
|
|
|
'App\Console\Commands\SendRecurringInvoices',
|
2016-03-24 13:02:45 -04:00
|
|
|
'App\Console\Commands\RemoveOrphanedDocuments',
|
2015-09-25 12:57:40 +03:00
|
|
|
'App\Console\Commands\ResetData',
|
|
|
|
|
'App\Console\Commands\CheckData',
|
2016-04-21 13:01:36 +03:00
|
|
|
'App\Console\Commands\PruneData',
|
2016-05-04 14:53:27 +03:00
|
|
|
'App\Console\Commands\CreateTestData',
|
2017-04-07 13:43:48 +03:00
|
|
|
'App\Console\Commands\CreateLuisData',
|
2020-02-23 12:36:40 +02:00
|
|
|
'App\Console\Commands\MobileLocalization',
|
2015-05-08 11:21:29 +03:00
|
|
|
'App\Console\Commands\SendRenewalInvoices',
|
2016-02-22 21:23:15 +02:00
|
|
|
'App\Console\Commands\ChargeRenewalInvoices',
|
2015-09-17 22:01:06 +03:00
|
|
|
'App\Console\Commands\SendReminders',
|
2016-08-03 12:40:40 +03:00
|
|
|
'App\Console\Commands\TestOFX',
|
2016-12-08 15:41:35 +02:00
|
|
|
'App\Console\Commands\MakeModule',
|
2016-12-08 20:00:13 +02:00
|
|
|
'App\Console\Commands\MakeClass',
|
2017-04-30 19:09:13 +03:00
|
|
|
'App\Console\Commands\InitLookup',
|
2017-05-26 13:21:32 +03:00
|
|
|
'App\Console\Commands\CalculatePayouts',
|
2017-07-25 21:48:36 +03:00
|
|
|
'App\Console\Commands\UpdateKey',
|
2020-03-06 07:30:48 +11:00
|
|
|
'App\Console\Commands\ExportMigrations',
|
2015-09-25 12:57:40 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
2017-01-30 21:40:43 +02:00
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
|
*
|
2015-09-25 12:57:40 +03:00
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
|
{
|
|
|
|
|
$logFile = storage_path() . '/logs/cron.log';
|
|
|
|
|
|
|
|
|
|
$schedule
|
|
|
|
|
->command('ninja:send-invoices --force')
|
|
|
|
|
->sendOutputTo($logFile)
|
|
|
|
|
->withoutOverlapping()
|
|
|
|
|
->hourly();
|
2015-03-12 10:44:39 +10:00
|
|
|
|
2015-09-25 12:57:40 +03:00
|
|
|
$schedule
|
|
|
|
|
->command('ninja:send-reminders --force')
|
|
|
|
|
->sendOutputTo($logFile)
|
|
|
|
|
->daily();
|
|
|
|
|
}
|
2015-03-12 10:44:39 +10:00
|
|
|
}
|