46 global $ilObjDataCache,$ilUser;
48 include_once
'./classes/class.ilLinkChecker.php';
58 $tmp_webr->initLinkResourceItemsObject();
63 $link_checker->setMailStatus(
true);
65 $link_checker->setObjId($tmp_webr->getId());
69 foreach($link_checker->checkWebResourceLinks() as $invalid)
71 $tmp_webr->items_obj->readItem($invalid[
'page_id']);
72 $tmp_webr->items_obj->setActiveStatus(
false);
73 $tmp_webr->items_obj->setValidStatus(
false);
74 $tmp_webr->items_obj->setDisableCheckStatus(
true);
75 $tmp_webr->items_obj->setLastCheckDate(time());
76 $tmp_webr->items_obj->update(
false);
81 foreach($link_checker->getLogMessages() as $message)
83 $this->log->write($message);
94 switch($ilias->getSetting(
'cron_web_resource_check'))
97 $period = 24 * 60 * 60;
101 $period = 7 * 24 * 60 * 60;
105 $period = 30 * 7 * 24 * 60 * 60;
109 $period = 4 * 30 * 7 * 24 * 60 * 60;