CRON: reschedule at startup IIF the task is inactive or it is planned in the future

SVN:trunk[2822]
This commit is contained in:
Romain Quetiez
2013-08-14 15:01:53 +00:00
parent 447736f585
commit 08fa8362e3

View File

@@ -134,7 +134,8 @@ function CronExec($oP, $aProcesses, $bVerbose)
{
$sTaskClass = $oTask->Get('class_name');
$oRefClass = new ReflectionClass($sTaskClass);
if ($oRefClass->implementsInterface('iScheduledProcess'))
$oNow = new DateTime();
if($oRefClass->implementsInterface('iScheduledProcess') && (($oTask->Get('status') != 'active') || ($oTask->Get('next_run_date') > $oNow->format('Y-m-d H:i:s'))))
{
if ($bVerbose)
{