Commit b8019981 authored by Nigel McNie's avatar Nigel McNie
Browse files

Only insert the institution expiries cronjob if it hasn't been before.


Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 483912a8
......@@ -889,14 +889,16 @@ function xmldb_core_upgrade($oldversion=0) {
add_field($table, $suspended);
// Insert a cron job to check for soon expiring and expired institutions
$cron = new StdClass;
$cron->callfunction = 'auth_handle_institution_expiries';
$cron->minute = '5';
$cron->hour = '9';
$cron->day = '*';
$cron->month = '*';
$cron->dayofweek = '*';
insert_record('cron', $cron);
if (!record_exists('cron', 'callfunction', 'auth_handle_institution_expiries')) {
$cron = new StdClass;
$cron->callfunction = 'auth_handle_institution_expiries';
$cron->minute = '5';
$cron->hour = '9';
$cron->day = '*';
$cron->month = '*';
$cron->dayofweek = '*';
insert_record('cron', $cron);
}
}
if ($oldversion < 2009031800) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment