/**
  * Returns the database schema status.
  * 
  * This method is usuall called once the user logs in, and alerts him if the schema is not up-to-date.
  * 
  * Returns either status incomplete if the schema is not up-to-date, or complete if everything is OK.
  */
 public function getSystemStatus()
 {
     if (Configuration::getOption("partkeepr.cronjobs.disablecheck", false) === true) {
         // Skip cronjob tests
         $inactiveCronjobs = array();
     } else {
         $inactiveCronjobs = CronLoggerManager::getInstance()->getInactiveCronjobs();
     }
     return array("data" => array("inactiveCronjobCount" => count($inactiveCronjobs), "inactiveCronjobs" => $inactiveCronjobs, "schemaStatus" => $this->getSchemaStatus()));
 }
<?php

/**
 * Checks for PartKeepr updates
 * Typically scheduled every one or two days.
 * 
 * @author felicitus
 *
 */
namespace PartKeepr\Cronjobs;

include __DIR__ . "/../src/backend/PartKeepr/PartKeepr.php";
use PartKeepr\PartKeepr, PartKeepr\CronLogger\CronLoggerManager;
PartKeepr::initialize();
PartKeepr::doVersionCheck();
CronLoggerManager::getInstance()->markCronRun(basename(__FILE__));
 /**
  * Marks the cronjobs as run, so that the user doesn't get an error during the first day.
  * 
  * This is necessary because if the user sets up the system and enters the cronjobs, there is a chance
  * that no cronjob has been ran when he logs in the first time and thus gets confused.
  */
 public function markCronjobsAsRun()
 {
     foreach (PartKeepr::getRequiredCronjobs() as $cronjob) {
         CronLoggerManager::getInstance()->markCronRun($cronjob);
     }
 }