1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 09:46:46 +02:00

Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10082 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-09-01 11:39:59 +00:00
parent d65ccbde11
commit 714aa8b09a
2 changed files with 20 additions and 0 deletions

View File

@@ -4284,7 +4284,26 @@ function page_footer($run_cron = true)
);
// Call cron-type script
$call_cron = false;
if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
{
$call_cron = true;
// Any old lock present?
if (!empty($config['cron_lock']))
{
$cron_time = explode(' ', $config['cron_lock']);
// If 1 hour lock is present we do not call cron.php
if ($cron_time[0] + 3600 >= time())
{
$call_cron = false;
}
}
}
// Call cron job?
if ($call_cron)
{
$cron_type = '';