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

lastcron indicator is not using scheduled tasks

    XMLWordPrintable

Details

    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE
    • MDL-47182-master
    • 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/

    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

              poltawski Dan Poltawski
              poltawski Dan Poltawski
              Simey Lameze Simey Lameze
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Sam Hemelryk Sam Hemelryk
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Nov/14