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

Scheduled task are randomly allocated to 0 - 23 minutes range only

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-73765-master-twenty-three-minutes
    • Hide
      1. Log in as an admin
      2. Go to Site administration > Server > Tasks > Scheduled tasks
      3. Edit the schedule of the 'Background processing for tags' (\core\task\tag_cron_task) task
      4. Check 'Reset task schedule to defaults' and save changes
      5. TEST - Check that the new schedule has the minute set to a random value from the range 0 - 59
      6. TEST - Repeat few times if needed and check that the random minute is sometimes also set to a value higher than 23.
      Show
      Log in as an admin Go to Site administration > Server > Tasks > Scheduled tasks Edit the schedule of the 'Background processing for tags' (\core\task\tag_cron_task) task Check 'Reset task schedule to defaults' and save changes TEST - Check that the new schedule has the minute set to a random value from the range 0 - 59 TEST - Repeat few times if needed and check that the random minute is sometimes also set to a value higher than 23.

      This code from MDL-47221 is a copy & paste mistake:

          public function set_minute($minute, $expandr = true) {
              if ($minute === 'R' && $expandr) {
                  $minute = mt_rand(self::HOURMIN, self::HOURMAX);
              }
              $this->minute = $minute;
          }
      

      It should read MINUTEMIN and MINUTEMAX.

      As a result, all randomly allocated tasks have always get random minute from the range 0 - 23 only.

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Luca Bösch Luca Bösch
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 3 minutes
                1h 3m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.