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

Enable and disable scheduled tasks from the CLI

    XMLWordPrintable

Details

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-79090-master
    • Hide

      Disabling a task:

      1. Choose a task in the web interface. Verify that it's enabled.
      2. From the command line, disable the task: php admin/cli/scheduled_task.php --disable="\your\task\here"
      3. In the web interface, verify that the task is disabled.

      Enabling a task:

      1. Choose a task in the web interface and disable it.
      2. From the command line, enable the task: php admin/cli/scheduled_task.php --enable="\your\task\here"
      3. In the web interface, verify that the task is disabled.

      Customisation persistence:

      1. Choose a task in the web interface. Change its schedule.
      2. From the command line, disable the task: php admin/cli/scheduled_task.php --disable="\your\task\here"
      3. In the web interface, verify that the task is disabled and the schedule is different.
      4. From the command line, enable the task: php admin/cli/scheduled_task.php --enable="\your\task\here"
      5. In the web interface, verify that the task is enabled and the schedule is still different.
      Show
      Disabling a task: Choose a task in the web interface. Verify that it's enabled. From the command line, disable the task: php admin/cli/scheduled_task.php --disable="\your\task\here" In the web interface, verify that the task is disabled. Enabling a task: Choose a task in the web interface and disable it. From the command line, enable the task: php admin/cli/scheduled_task.php --enable="\your\task\here" In the web interface, verify that the task is disabled. Customisation persistence: Choose a task in the web interface. Change its schedule. From the command line, disable the task: php admin/cli/scheduled_task.php --disable="\your\task\here" In the web interface, verify that the task is disabled and the schedule is different. From the command line, enable the task: php admin/cli/scheduled_task.php --enable="\your\task\here" In the web interface, verify that the task is enabled and the schedule is still different.

    Description

      Being able to disable and enable individual tasks from the CLI would be useful, especially if you need to do it in bulk. I wrote some scripts while working on MDL-79034 that deliver this capability and also check for whether a task is customised or not.

      Attachments

        Activity

          People

            cfulton Charles Fulton
            cfulton Charles Fulton
            Andrew Lyons Andrew Lyons
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Clockify

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