mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
Created config option to disable auto cron
This commit is contained in:
1 parent
79e76e93da
commit
4379beb74c
4 files changed
+9
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user