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");
37 return self::SCHEDULE_TYPE_DAILY;
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);
activationWasToggled($a_currently_active)
Cron job application base class.
static _getObjectsByOperations($a_obj_type, $a_operation, $a_usr_id=0, $limit=0)
Get all objects of a specific type and check access This function is not recursive, instead it parses the serialized rbac_pa entries.
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
getDefaultScheduleValue()
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Cron job result data container.
getScheduleType()
Get current schedule type (if flexible)