Commit | Line | Data |
---|---|---|
11ade432 | 1 | <?php |
ef875357 | 2 | namespace wcf\system\cache\builder; |
11ade432 AE |
3 | use wcf\system\WCF; |
4 | ||
5 | /** | |
6 | * Caches cronjob information. | |
7 | * | |
8 | * @author Alexander Ebert | |
07356d6b | 9 | * @copyright 2001-2013 WoltLab GmbH |
11ade432 AE |
10 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> |
11 | * @package com.woltlab.wcf | |
8cb7186a | 12 | * @subpackage system.cache.builder |
9f959ced | 13 | * @category Community Framework |
11ade432 | 14 | */ |
07356d6b | 15 | class CronjobCacheBuilder extends AbstractCacheBuilder { |
11ade432 | 16 | /** |
07356d6b | 17 | * @see wcf\system\cache\builder\AbstractCacheBuilder::rebuild() |
11ade432 | 18 | */ |
07356d6b | 19 | public function rebuild(array $parameters) { |
11ade432 AE |
20 | $sql = "SELECT MIN(nextExec) AS nextExec, |
21 | MIN(afterNextExec) AS afterNextExec | |
f1c1fc65 | 22 | FROM wcf".WCF_N."_cronjob"; |
11ade432 | 23 | $statement = WCF::getDB()->prepareStatement($sql); |
f1c1fc65 | 24 | $statement->execute(); |
11ade432 AE |
25 | $row = $statement->fetchArray(); |
26 | ||
27 | return array( | |
28 | 'afterNextExec' => $row['afterNextExec'], | |
29 | 'nextExec' => $row['nextExec'] | |
30 | ); | |
31 | } | |
32 | } |