Skip to content

Turn local_lsf_unification_cron into a scheduled task #17

@dlmsr

Description

@dlmsr

This plugins runs the function insert_missing_helptable_entries once a day using the old cron functionality:

/**
 * Function to be run periodically according to the scheduled task.
 *
 * NOTE: Since 2.7.2 this function is run by scheduled task rather
 * than standard cron.
 * @package local_lsf_unification
 */
function local_lsf_unification_cron() {
    global $CFG, $pgdb;
    include_once(dirname(__FILE__) . '/class_pg_lite.php');
    include_once(dirname(__FILE__) . '/lib_features.php');

    $pgdb = new pg_lite();
    $connected = $pgdb->connect();
    $recourceid = $pgdb->connection;

    mtrace(
        '! = unknown category found, ? = unknown linkage found;' . 'Verbindung: ' .
        ($connected ? 'ja' : 'nein') . ' (' . $recourceid . ')'
    );

    insert_missing_helptable_entries(true, false);

    $pgdb->dispose();
}

This should be transformed into a scheduled task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions