BUG 9630 "cron.php script can have several instances running..." SOLVED

- cron.php script can have several instances running at the same time
- Problem solved, added validation in cron.php script to avoid run
  several times
- Variable time added to control execution of cron
* Available from version 2.0.44
This commit is contained in:
Victor Saisa Lopez
2012-09-03 11:32:52 -04:00
parent a8ec47dd0d
commit 331cb04a2c
8 changed files with 159 additions and 94 deletions

View File

@@ -1377,7 +1377,7 @@ class AppCacheView extends BaseAppCacheView
return $aRows;
}
public function appTitleByTaskCaseLabelUpdate($taskUid, $lang)
public function appTitleByTaskCaseLabelUpdate($taskUid, $lang, $cron=0)
{
$taskDefTitle = null;
@@ -1409,6 +1409,12 @@ class AppCacheView extends BaseAppCacheView
$rsCriteriaAPPCV->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($rsCriteriaAPPCV->next()) {
if ($cron == 1) {
$arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron")));
$arrayCron["processcTimeStart"] = time();
@file_put_contents(PATH_DATA . "cron", serialize($arrayCron));
}
$row = $rsCriteriaAPPCV->getRow();
$appcvAppUid = $row["APP_UID"];