getVersion(), __FILE__, __LINE__, __METHOD__, 9 ); return true; } /** * @return bool */ function postInstall() { Debug::text( 'postInstall: ' . $this->getVersion(), __FILE__, __LINE__, __METHOD__, 9 ); //Enable AutoUpgrade maintenance job to occur after MiscDaily (backup) has completed. $cjf = TTnew( 'CronJobFactory' ); /** @var CronJobFactory $cjf */ $cjf->setName( 'AutoUpgrade' ); $cjf->setMinute( rand( 0, 59 ) ); //Random time once a day for load balancing $cjf->setHour( rand( 2, 4 ) ); //Random time once a day for load balancing $cjf->setDayOfMonth( '*' ); $cjf->setMonth( '*' ); $cjf->setDayOfWeek( '*' ); $cjf->setCommand( 'AutoUpgrade.php' ); $cjf->Save(); return true; } } ?>