diff --git a/classes/taskrunner.php b/classes/taskrunner.php index c307fd5..265a7a0 100644 --- a/classes/taskrunner.php +++ b/classes/taskrunner.php @@ -18,7 +18,10 @@ defined('MOODLE_INTERNAL') || die(); -require_once($CFG->libdir . '/cronlib.php'); +//pre Moodle 4.2 incl cronlib +if($CFG->version<2023042400) { + require_once($CFG->libdir . '/cronlib.php'); +} /** *