Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-8223

Cron tasks will NEVER run (Configurable Reports plugin)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.7, 3.8.4, 3.9.1
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      Description

      I just found out that due to bug in Configurable Reports plugin, its Cron tasks will never run.

      I am using the latest Configurable Reports plugin, version 3.8.0 (2019122000).

      In block_configurable_reports.php method cron() of class block_configurable_reports, lines 182-185:

      $lastcron = $DB->get_field('block', 'lastcron', array('name' => 'configurable_reports'));
      if (!$lastcron and ($lastcron + $this->cron < time()) ) {
        return false;
      }
      

       

      The condition to exit from method by returning false should be if ($lastcron …, not (!$lastcron …) as it is now. Otherwise whenever the plugin never ever run its cron tasks before, it will always return, as $lastcron will be false.

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            furlosk Robert Toth
            Participants:
            Component watchers:
            Juan Leyva, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: