Files
firefly-iii/app/Console/Kernel.php

58 lines
1.6 KiB
PHP
Raw Normal View History

<?php
2018-05-11 10:08:34 +02:00
2017-10-21 08:40:00 +02:00
/**
* Kernel.php
2018-05-11 10:08:34 +02:00
* Copyright (c) 2018 thegrumpydictator@gmail.com
2017-10-21 08:40:00 +02:00
*
* This file is part of Firefly III.
*
* Firefly III is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Firefly III is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2017-12-17 14:41:58 +01:00
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
2017-10-21 08:40:00 +02:00
*/
2017-09-14 17:40:02 +02:00
2018-05-11 10:08:34 +02:00
declare(strict_types=1);
namespace FireflyIII\Console;
2015-02-06 04:39:52 +01:00
use Carbon\Carbon;
use FireflyIII\Jobs\CreateRecurringTransactions;
2017-09-09 21:57:24 +02:00
use Illuminate\Console\Scheduling\Schedule;
2015-02-06 04:39:52 +01:00
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
2017-09-16 07:41:03 +02:00
/**
2018-06-24 13:23:08 +02:00
* File to make sure commands work.
2017-09-16 07:41:03 +02:00
*/
2015-02-11 07:35:10 +01:00
class Kernel extends ConsoleKernel
{
/**
2017-09-14 17:40:02 +02:00
* Register the commands for the application.
2015-02-11 07:35:10 +01:00
*/
2018-06-24 13:23:08 +02:00
protected function commands(): void
2017-09-09 21:57:24 +02:00
{
2017-09-14 17:40:02 +02:00
$this->load(__DIR__ . '/Commands');
2018-07-05 21:18:53 +02:00
/** @noinspection PhpIncludeInspection */
2017-09-14 17:40:02 +02:00
require base_path('routes/console.php');
2017-09-09 21:57:24 +02:00
}
2016-09-16 06:40:45 +02:00
/**
2017-09-14 17:40:02 +02:00
* Define the application's command schedule.
*
2017-11-15 12:25:49 +01:00
* @param \Illuminate\Console\Scheduling\Schedule $schedule
2016-09-16 06:40:45 +02:00
*/
protected function schedule(Schedule $schedule): void
2016-09-16 06:40:45 +02:00
{
2018-06-23 05:41:14 +02:00
$schedule->job(new CreateRecurringTransactions(new Carbon))->daily();
2016-09-16 06:40:45 +02:00
}
2015-02-06 04:39:52 +01:00
}