1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Console/Kernel.php

76 lines
2.1 KiB
PHP
Raw Normal View History

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