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:
@@ -2964,7 +2964,7 @@ class Cases
|
||||
* Description: This method set all cases with the APP_DISABLE_ACTION_DATE for today
|
||||
* @return void
|
||||
*/
|
||||
public function ThrowUnpauseDaemon($today)
|
||||
public function ThrowUnpauseDaemon($today, $cron=0)
|
||||
{
|
||||
$today = ($today==date('Y-m-d'))?date('Y-m-d'):$today;
|
||||
$c = new Criteria('workflow');
|
||||
@@ -2983,7 +2983,14 @@ class Cases
|
||||
$d = AppDelayPeer::doSelectRS($c);
|
||||
$d->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$d->next();
|
||||
|
||||
while ($aRow = $d->getRow()) {
|
||||
if ($cron == 1) {
|
||||
$arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron")));
|
||||
$arrayCron["processcTimeStart"] = time();
|
||||
@file_put_contents(PATH_DATA . "cron", serialize($arrayCron));
|
||||
}
|
||||
|
||||
$this->unpauseCase($aRow['APP_UID'], $aRow['APP_DEL_INDEX'], 'System Daemon');
|
||||
$d->next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user