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

cron execution dies two minutes after forum cron execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.7.3, 1.8.3, 1.9
    • 1.7.2, 1.8.2, 1.9
    • Administration
    • None
    • Any
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      While monitoring cron execution under one big site I've noticed that the execution was dying after some undetermined period (happening in different steps of the cron execution).

      After some research, I think I've traced the cause of the problem. Explanation follows:

      1) admin/cron.php sets time_limit to 0 (unlimited)
      2) forum_cron is called and time_limit is set to 120
      3) cron execution continues and, after 2 minutes, dies!

      And this can be the cause of a lot of problems because some parts of the cron execution are never raised (clean-up tasks, backup...).

      There are two possible solutions:

      1) Forbid the use of "custom" time_limits within module/block... cron functions.
      2) In the admin/cron-php set time_limit to 0 after each module/block... cron call.

      Note that this is a problem since, at least, Moodle 1.7 ! And seems important!

      Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Nobody Nobody
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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