ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilLearningModuleCronLinkCheck.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "Services/Cron/classes/class.ilCronJob.php";
5
15{
16 public function getId()
17 {
18 return "lm_link_check";
19 }
20
21 public function getTitle()
22 {
23 global $lng;
24
25 return $lng->txt("check_link");
26 }
27
28 public function getDescription()
29 {
30 global $lng;
31
32 return $lng->txt("check_link_desc");
33 }
34
35 public function getDefaultScheduleType()
36 {
38 }
39
40 public function getDefaultScheduleValue()
41 {
42 return;
43 }
44
45 public function hasAutoActivation()
46 {
47 return false;
48 }
49
50 public function hasFlexibleSchedule()
51 {
52 return false;
53 }
54
55 public function run()
56 {
57 global $ilLog, $ilDB;
58
60
61 include_once'./Services/LinkChecker/classes/class.ilLinkChecker.php';
62
63 $link_checker =& new ilLinkChecker($ilDB);
64 $link_checker->setMailStatus(true);
65
66 $link_checker->checkLinks();
67
68 $counter = 0;
69 foreach($link_checker->getLogMessages() as $message)
70 {
71 $ilLog->write($message);
72 $counter++;
73 }
74
75 if($counter)
76 {
78 }
80 $result->setStatus($status);
81 return $result;
82 }
83}
84
85?>
$result
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_DAILY
hasFlexibleSchedule()
Can the schedule be configured?
hasAutoActivation()
Is to be activated on "installation".
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
global $lng
Definition: privfeed.php:40
global $ilDB