Browse Source

[FIX] Do not call cron if Maintenance Mode is on

quickform
Adam Bukowski 5 years ago
parent
commit
8a26c9b124
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      cron.php

+ 2
- 0
cron.php View File

@@ -28,6 +28,8 @@ if (php_sapi_name() == 'cli') {
}
require_once('include.php');

if (file_exists(DATA_DIR . '/maintenance_mode.php')) die();

$lock = DATA_DIR.'/cron.lock';
if(file_exists($lock) && filemtime($lock)>time()-6*3600) die();
register_shutdown_function(create_function('','@unlink("'.$lock.'");'));


Loading…
Cancel
Save