Scheduled tasks keep failing

Scheduled tasks keep failing

Tanja Klingbeil -
回帖数:5

Hello,

our Moodle is running on version 4.4.1. All the scheduled tasks keep failing. In a first step, I cleared the "fail delay".

I then filtered the "fail" tasks:

  • Download available H5P content types from h5p.org\core\task\h5p_get_content_types_task
  • Site registration\core\task\registration_cron_task
  • \mod_workshop\task\legacy_workshop_allocation_cron
  • \mod_quiz\task\legacy_quiz_accessrules_cron
  • \mod_quiz\task\legacy_quiz_reports_cron
  • \core\task\legacy_plugin_cron_task
  • Convert submission\assignfeedback_editpdf\task\convert_submission

I add a screenshot of some tasks.

Has anyone an idea how to fix this problem?

Thank you for your help

附件 tasks failing.jpeg
回复Tanja Klingbeil

Re: Scheduled tasks keep failing

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
At a first glance the errors may have different reasons:
- First two (h5p and site registration) usually the firewall blocking outgoing connections
- Middle, too many "legacies"
- Last, missing tools to convert pdfs, most commonly GhostScript, not working...

Moodle 4.4.1? What is the upgrading history? Also provide details about you platform. See Before you post.. read this...

 Either way try to get detailed logs by raising the Debugging level to Developer!
回复Tanja Klingbeil

Re: Scheduled tasks keep failing

Ken Task -
Particularly helpful Moodlers的头像

All the scheduled task are part of the overall cron job.

Sounds like you might have command line access so do this ...

ssh into server - if using sudo issue sudo -s and provide same password .. prompt should change to root.   Now don't have to type sudo all the time.

Then:

cd /path/to/moodlecode/admin/cli/

php cron.php [ENTER]

When it gets to the last part of the cron you will see adhoc-task, it might loop .. let it loop - as long as it takes.

When it finishes ... up arrow from keyboard press ENTER again to run cron.php again.

The second run should show nothing to do ... and when it hits adhoc task it will loop again ... let it run.

The other thing to do ... set the path to php-cli in paths.

Then go to the task list ... you should see a 'run now' link in those that are active.   Pick one related to your list given in your posting and click the 'run now' link - it will warn ... but do it anyway.

'SoS', Ken

回复Ken Task

Re: Scheduled tasks keep failing

Tanja Klingbeil -
Hello Ken,

thank you for your answer. My colleague who helps me to update our platform struggles with your last point:

"Then go to the task list ... you should see a 'run now' link in those that are active. Pick one related to your list given in your posting and click the 'run now' link - it will warn ... but do it anyway."

Could you be a little more specific, please?

Thank you