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:
@@ -493,7 +493,7 @@ class spoolRun {
|
||||
* @param string $dateResend
|
||||
* @return none or exception
|
||||
*/
|
||||
public function resendEmails($dateResend=null)
|
||||
public function resendEmails($dateResend=null, $cron=0)
|
||||
{
|
||||
require_once ("classes/model/Configuration.php");
|
||||
|
||||
@@ -541,6 +541,12 @@ class spoolRun {
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rsCriteria->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 = $rsCriteria->getRow();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user