Created config option to disable auto cron

This commit is contained in:
Belle Aerni committed 2022-10-28 10:03:41 -07:00
1 parent 79e76e93da
commit 4379beb74c
4 files changed
+9 -1

No files matched your search

+5
View File
@@ -56,6 +56,11 @@ return [
'allowed_ips' => [],
],
/**
* FOSSBilling will automatically execute cron when you login to the admin panel if it hasn't been executed in awhile. You can disable this fallback here.
*/
'disable_auto_cron' => false,
/**
* Enable or disable search engine friendly URLs.
* Configure .htaccess file before enabling this feature
+1
View File
@@ -498,6 +498,7 @@ class Box_Tools
'salt' => $currentConfig['salt'],
'url' => $currentConfig['url'],
'admin_area_prefix' => $currentConfig['admin_area_prefix'],
'disable_auto_cron' => (isset($currentConfig['disable_auto_cron'])) ? $currentConfig['disable_auto_cron'] : false,
'sef_urls' => $currentConfig['sef_urls'],
'timezone' => $currentConfig['timezone'],
'locale' => $currentConfig['locale'],
+2 -1
View File
@@ -243,7 +243,8 @@ class Service
error_log($e->getMessage());
}
$last_exec = $this->getParamValue('last_cron_exec');
if($runFromTest === false) {
$disableAutoCron = isset($this->di['config']['disable_auto_cron']) ? $this->di['config']['disable_auto_cron'] : false;
if($runFromTest === false && $disableAutoCron === false) {
if (!$last_exec) {
$msgs['info'][] = 'Cron was never executed. FOSSBilling will automatically execute cron when you access the admin panel, but you should make sure you have setup cron the job.';
$cronService = $this->di['mod_service']('cron');
+1
View File
@@ -421,6 +421,7 @@ final class Box_Installer
'salt' => md5(random_bytes(13)),
'url' => BB_URL,
'admin_area_prefix' => '/admin',
'disable_auto_cron' => false,
'sef_urls' => true,
'timezone' => 'UTC',
'locale' => 'en_US',