mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-14 01:13:37 -06:00
Expand schedule.
This commit is contained in:
parent
0b9be029ac
commit
72cca5ccbf
@ -32,7 +32,7 @@ use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
/**
|
||||
* File to make sure commnds work.
|
||||
* File to make sure commands work.
|
||||
*/
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
@ -48,7 +48,7 @@ class Kernel extends ConsoleKernel
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*/
|
||||
protected function commands()
|
||||
protected function commands(): void
|
||||
{
|
||||
$this->load(__DIR__ . '/Commands');
|
||||
|
||||
@ -59,8 +59,6 @@ class Kernel extends ConsoleKernel
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
@ -76,5 +74,15 @@ class Kernel extends ConsoleKernel
|
||||
event(new AdminRequestedTestMessage($user, $ipAddress));
|
||||
}
|
||||
)->daily();
|
||||
|
||||
// send test email.
|
||||
$schedule->call(
|
||||
function () {
|
||||
$ipAddress = '127.0.0.2';
|
||||
/** @var User $user */
|
||||
$user = User::find(1);
|
||||
event(new AdminRequestedTestMessage($user, $ipAddress));
|
||||
}
|
||||
)->hourly();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user