[3.3.1+] Forum notification emails cron not working anymore (Build: 20170810)

[3.3.1+] Forum notification emails cron not working anymore (Build: 20170810)

by Jeff Noel -
Number of replies: 1

Hi,


I recently switched my outbound email configuration a different SMTP host. After a few days, I switched back to my old configuration (I took notes and screenshots of the original settings) because the new host couldn't sustain the heavy load from our emai flow.


Emails are working fine and are being sent for anything like personnal messages... but not for things related to forums. Students that are automatically subscribed to their teacher's theads don't receive emails at all coming from the forums.


I tried running the forum scheduled task manualy by executing the cron.php manually though CLI, and also tried triggering the task manually through the scheduled task interface in the site administration settings ( https://moodle.uqat.ca/admin/tool/task/scheduledtasks.php )

The task in question is \mod_forum\task\cron_task 

When I run it, it gives the following error:

Execute scheduled task: Envoi des messages et maintenance des forums (mod_forum\task\cron_task)
... started 11:03:13. Current memory use 9.8Mo.
Processing user 14416
... used 269 dbqueries
... used 0.18720102310181 seconds
Scheduled task failed: Envoi des messages et maintenance des forums (mod_forum\task\cron_task),Erreur de programmation détectée. Ceci doit être corrigé par un programmeur : Function cron_setup_user() cannot be used in normal requests!

If you want the error in English, someone opened a similar bug in the bug tracker: MDL-60514


The new semester just begun and people don't receive their email notifications... how can I force it ?

Thank you in advance for your help and have a nice day,


Jeff


PS: The issue appeared out of the blue this week. The last time we updated Moodle is roughly 5 months ago !

Average of ratings: -
In reply to Jeff Noel

Re: [3.3.1+] Forum notification emails cron not working anymore (Build: 20170810)

by Jeff Noel -

I found a solution.


While I was changing the settings, the cron tried running and failed. The delay until the next execution was set at 86400 seconds (24 hours).

I updated the delay to 0 in the database for this scheduled task and it ran perfectly through the CLI scheduled tasks.