Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-47182

lastcron indicator is not using scheduled tasks

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Install a new Moodle dont setup cron
      2. Disable all activity modules (update mdl_modules set visible = 0
      3. Run cron
      4. VERIFY: you do not get warned about cron having not run recently when visiting /admin/
      Show
      Install a new Moodle dont setup cron Disable all activity modules (update mdl_modules set visible = 0 Run cron VERIFY: you do not get warned about cron having not run recently when visiting /admin/
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-47182-master

      Description

      On one of our sites we have disabled all activity modules.

      Unfortunately that causes the 'cron not run recently' warning to occur as it does:

      $lastcron = $DB->get_field_sql('SELECT MAX(lastcron) FROM {modules}');
      

      Perhaps we could use scheduled tasks lastrun for this indicator instead.

      Steps to reproduce:

      1. Install a new Moodle dont setup cron
      2. Disable all activity modules
      3. Run cron manally

      Expected result:
      The 'cron.php maintenance script</a> has not been run for at least 24 hours.' does not appear.

      Actual result:
      The cron warning appears and never disappears.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                poltawski Dan Poltawski
                Reporter:
                poltawski Dan Poltawski
                Peer reviewer:
                Simey Lameze
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Sam Hemelryk
                Participants:
                Component watchers:
                Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Nov/14