4 include_once
"Services/Cron/classes/class.ilCronJob.php";
18 return "webr_link_check";
25 return $lng->txt(
"check_web_resources");
32 return $lng->txt(
"check_web_resources_desc");
61 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
71 $tmp_webr->initLinkResourceItemsObject();
76 $link_checker->setMailStatus(
true);
78 $link_checker->setObjId($tmp_webr->getId());
82 foreach($link_checker->checkWebResourceLinks() as $invalid)
84 $tmp_webr->items_obj->readItem($invalid[
'page_id']);
85 $tmp_webr->items_obj->setActiveStatus(
false);
86 $tmp_webr->items_obj->setValidStatus(
false);
87 $tmp_webr->items_obj->setDisableCheckStatus(
true);
88 $tmp_webr->items_obj->setLastCheckDate(time());
89 $tmp_webr->items_obj->update(
false);
94 foreach($link_checker->getLogMessages() as $message)
96 $ilLog->write($message);
114 case self::SCHEDULE_TYPE_DAILY:
115 $period = 24 * 60 * 60;
118 case self::SCHEDULE_TYPE_WEEKLY:
119 $period = 7 * 24 * 60 * 60;
122 case self::SCHEDULE_TYPE_MONTHLY:
123 $period = 30 * 7 * 24 * 60 * 60;
126 case self::SCHEDULE_TYPE_QUARTERLY:
127 $period = 3 * 30 * 7 * 24 * 60 * 60;
141 $ilSetting->set(
"cron_web_resource_check", (
bool)$a_currently_active);