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

Scheduled tasks CLI Script --list option does not show the last time the task ran successfully

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1, 3.5
    • Fix Version/s: 3.5
    • Component/s: Tasks
    • Labels:
    • Testing Instructions:
      Hide
      1. On your terminal, go to your Moodle root directory.
      2. Run

        php admin/tool/task/cli/schedule_task.php --list

      3. Make sure in the resulting list there is a "lastrun" column with values "Never" or a "userdate" of the last run
      Show
      On your terminal, go to your Moodle root directory. Run php admin/tool/task/cli/schedule_task.php --list Make sure in the resulting list there is a "lastrun" column with values "Never" or a "userdate" of the last run
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-56543-master

      Description

      Scheduled tasks CLI Script --list option does not show the last time the task ran successfully

      admin/tool/task/cli/schedule_task.php --list

      Current 3.1.1 output is shown below

      \assignfeedback_editpdf\task\convert_submissions */15 * * * * * ASAP
      \auth_cas\task\sync_task 0 0 * * * * Plugin disabled
      \auth_ldap\task\sync_task 0 0 * * * * Plugin disabled
      \editor_atto\task\autosave_cleanup_task 18 13 * 2 * 2 Tuesday, October 25, 2016, 1:18 PM
      \enrol_flatfile\task\flatfile_sync_task 15 * * * * * Plugin disabled
      \enrol_imsenterprise\task\cron_task 10 * * * * * Plugin disabled
      \enrol_lti\task\sync_grades */30 * * * * * Plugin disabled
      \enrol_lti\task\sync_members */30 * * * * * Plugin disabled
      \logstore_legacy\task\cleanup_task 16 5 * * * * Saturday, October 22, 2016, 5:16 AM

      It would be useful for monitoring successful completion of tasks if the --list option also displayed the last time the task ran successfully, not only the next time the task is scheduled to run.

      Additionally, if the dates could be outputted in the UNIX time stamp format, this would allow for easier consumption via monitoring scripts.

        Attachments

          Activity

            People

            Assignee:
            ankit_frenz Ankit Agarwal
            Reporter:
            mikehas mikehas
            Peer reviewer:
            Adrian Greeve
            Integrator:
            Jun Pataleta
            Tester:
            Gladys Basiana
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              17/May/18