1<?php
2
3//include base config
4$inc = realpath(__DIR__.'/../../..');
5define('DOKU_INC', $inc.'/');
6
7// load and initialize the core system
8require_once(DOKU_INC.'inc/init.php');
9
10if (empty($conf['baseurl'])) {
11    echo "set baseurl in dokuwiki config\n";
12    exit(-1);
13}
14
15if (empty($conf['basedir'])) {
16    echo "set basedir in dokuwiki config\n";
17    exit(-1);
18}
19
20
21require_once 'cron/functions.php';
22
23$errors = [];
24try {
25    if (date('l') === $conf['plugin']['bez']['weekly_cron_day_of_the_week']) {
26        send_weekly_message();
27    }
28
29    send_task_reminder();
30    send_inactive_issue();
31} catch (Exception $e) {
32    $errors[] = $e->getMessage();
33}
34
35if ($errors) {
36    echo $conf['baseurl'] . ":\n";
37    echo implode("\n", $errors);
38    echo "\n";
39    exit(-1);
40}
41
42