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

Allow cron script to run a specific type of task

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.9.3, 3.10, 3.11
    • Tasks
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-70507_master
    • Hide

      Scenario 1 - Admin cron cli script runs correctly

      1. Run admin cli cron script as you normally do

        sudo -u www-data php admin/cli/cron.php
        

      2. Result: Admin cli cron script runs both scheduled and ad-hoc tasks

      Scenario 2 - Admin cron cli script runs only scheduled tasks

      1. Run admin cli cron script specifying the "scheduled" type

        sudo -u www-data php admin/cli/cron.php -t=scheduled
        

      2. Result: Admin cli cron script runs only scheduled tasks

      Scenario 3 - Admin cron cli script runs only ad-hoc tasks

      1. Run admin cli cron script specifying the "adhoc" type

        sudo -u www-data php admin/cli/cron.php -t=adhoc
        

      2. Result: Admin cli cron script runs only ad-hoc tasks

      Scenario 4 - Admin cron cli script doesn't allow running other unexistent types

      1. Run admin cli cron script specifying the "unexistent" type

        sudo -u www-data php admin/cli/cron.php -t=unexistent
        

      2. Result: Admin cli cron script will throw an error stating that this type is unrecognized
      Show
      Scenario 1 - Admin cron cli script runs correctly Run admin cli cron script as you normally do sudo -u www-data php admin/cli/cron.php Result: Admin cli cron script runs both scheduled and ad-hoc tasks Scenario 2 - Admin cron cli script runs only scheduled tasks Run admin cli cron script specifying the "scheduled" type sudo -u www-data php admin/cli/cron.php -t=scheduled Result: Admin cli cron script runs only scheduled tasks Scenario 3 - Admin cron cli script runs only ad-hoc tasks Run admin cli cron script specifying the "adhoc" type sudo -u www-data php admin/cli/cron.php -t=adhoc Result: Admin cli cron script runs only ad-hoc tasks Scenario 4 - Admin cron cli script doesn't allow running other unexistent types Run admin cli cron script specifying the "unexistent" type sudo -u www-data php admin/cli/cron.php -t=unexistent Result: Admin cli cron script will throw an error stating that this type is unrecognized

      It would be nice if admin/cli/cron.php would receive an argument so it runs a specific type of task. This can help ease the pain in big sites which accumulate big amounts of ad-hoc tasks.

            dvdcastro David Castro
            dvdcastro David Castro
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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