mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Alert if cron job isn't running.
This commit is contained in:
@@ -33,6 +33,7 @@ use Log;
|
||||
*/
|
||||
trait GetConfigurationData
|
||||
{
|
||||
|
||||
/**
|
||||
* All packages that are installed.
|
||||
*
|
||||
@@ -247,4 +248,21 @@ trait GetConfigurationData
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected function verifyRecurringCronJob(): void
|
||||
{
|
||||
$config = app('fireflyconfig')->get('last_rt_job', 0);
|
||||
$lastTime = (int)$config->data;
|
||||
$now = time();
|
||||
if (0 === $lastTime) {
|
||||
request()->session()->flash('info', trans('firefly.recurring_never_cron'));
|
||||
return;
|
||||
}
|
||||
if($now - $lastTime > 129600) {
|
||||
request()->session()->flash('warning', trans('firefly.recurring_cron_long_ago'));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user