mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Expand schedule.
This commit is contained in:
@@ -32,7 +32,7 @@ use Illuminate\Console\Scheduling\Schedule;
|
|||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File to make sure commnds work.
|
* File to make sure commands work.
|
||||||
*/
|
*/
|
||||||
class Kernel extends ConsoleKernel
|
class Kernel extends ConsoleKernel
|
||||||
{
|
{
|
||||||
@@ -48,7 +48,7 @@ class Kernel extends ConsoleKernel
|
|||||||
/**
|
/**
|
||||||
* Register the commands for the application.
|
* Register the commands for the application.
|
||||||
*/
|
*/
|
||||||
protected function commands()
|
protected function commands(): void
|
||||||
{
|
{
|
||||||
$this->load(__DIR__ . '/Commands');
|
$this->load(__DIR__ . '/Commands');
|
||||||
|
|
||||||
@@ -59,8 +59,6 @@ class Kernel extends ConsoleKernel
|
|||||||
* Define the application's command schedule.
|
* Define the application's command schedule.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||||
*
|
|
||||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
|
||||||
*/
|
*/
|
||||||
protected function schedule(Schedule $schedule): void
|
protected function schedule(Schedule $schedule): void
|
||||||
{
|
{
|
||||||
@@ -76,5 +74,15 @@ class Kernel extends ConsoleKernel
|
|||||||
event(new AdminRequestedTestMessage($user, $ipAddress));
|
event(new AdminRequestedTestMessage($user, $ipAddress));
|
||||||
}
|
}
|
||||||
)->daily();
|
)->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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user