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

executing scheduled task 3 minutes after deactivating plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 4.3.3
    • Tasks
    • None
    • MOODLE_403_STABLE

      This behavior occurred after an update from 4.0.0 to 4.3.3 during the development of the scheduled task of a plugin: 

      Usually, we set the execution time of the scheduled task to "every minute" (see Screenshot 1), keep the plugin deactivated, and activate the plugin just for some second until the next run is complete. Once the plugin is deactivated, the scheduled task should no longer be executed. This worked fine in the version 4.0.0. 

      However, since we updated our staging instance to 4.3.3, after deactivating the plugin the scheduled task runs for three more minutes (see Screenshot 2). (If we set the configuration to run the scheduled task every second minute, it runs only once after the plugin has been deactivated.) 

      To eliminate the possibility that behavior is based on an error in our plugin, we reproduced the behavior with another plugin. 

      This bug should not be an problem during the normal usage of plugins in moodle. (Usually nobody switches plugins on and off as frequently as we do during development and almost no plugin runs more the once in three minutes.) However, something changes from 4.0.0 to 4.3.3 that maybe should not have changed. 

      I hope the description helps to reproduce the behavior. 

      Please note: I cannot downgrade moodle by myself to find the the release in which the error occurs the first time. I'm also not able update the moodle to the current version 4.4.0. However, as far as I can see from the release notes (and the fixed bugs), this isn't something what has been fixed in the last update. 

      Can anyone else reproduce this behavior (I used a LDAP syncing task to crosscheck)?

      Have a great day
      B

       

      Screenshot 1: Scheduled task setup

       

      Screenshot 2: runs of scheduled task after activation and deactivation

            danmarsden Dan Marsden
            loewe B Lw
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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