<description language="de">Aktualisiert Paket-Informationen</description>
<startminute>0</startminute>
<starthour>2</starthour>
- <startdom>*/2</startdom>
+ <startdom>*</startdom>
<startmonth>*</startmonth>
<startdow>*</startdow>
<canbedisabled>0</canbedisabled>
use wcf\data\category\CategoryEditor;
use wcf\data\object\type\ObjectTypeCache;
+use wcf\data\package\PackageCache;
use wcf\data\user\UserEditor;
use wcf\data\user\UserProfileAction;
use wcf\system\WCF;
'title' => 'Default Category',
'time' => TIME_NOW,
]);
+
+// Randomize the times of the package list update and robot list update cronjobs.
+$sql = "UPDATE wcf1_cronjob
+ SET startMinute = ?,
+ startHour = ?,
+ startDom = ?,
+ startMonth = ?,
+ startDow = ?,
+ lastExec = ?,
+ nextExec = ?,
+ afterNextExec = ?
+ WHERE packageiD = ?
+ AND cronjobName = ?";
+$statement = WCF::getDB()->prepare($sql);
+$statement->execute([
+ \random_int(0, 59),
+ \random_int(0, 23),
+ '*',
+ '*',
+ '*',
+
+ 0,
+ \TIME_NOW,
+ 0,
+
+ $this->installation->getPackageID(),
+ 'com.woltlab.wcf.refreshPackageUpdates',
+]);
+$statement->execute([
+ \random_int(0, 59),
+ \random_int(0, 23),
+ \random_int(1, 15),
+ '*',
+ '*',
+
+ 0,
+ \TIME_NOW,
+ 0,
+
+ $this->installation->getPackageID(),
+ 'com.woltlab.wcf.refreshSearchRobots',
+]);