Forum emails not sending to all users-cron running

Forum emails not sending to all users-cron running

by george williams -
Number of replies: 4

Hi. Again, apologies for a topic/problem that has been highlighted many times before. We have recently upgraded from v2.6 to v2.9.7. We have started noticing that some emails are coming through from forum posts fine, but on others not going through at all. Also, I have noticed that some are going out when the next cron job is run, but others are sent out 3 or 4 hour later. (checked smtp server logs to verify this). There doesn't seem to be a set pattern.

I am new to the administration side of Moodle (so apologies), but the cron seems to running (set up with Windows Task scheduler). We are using Windows 2008r server, and MS SQL. I wanted to know where else to look to diagnose this problem apart from Cron? Where do the forum posts sit in moodle database waiting to be mailed? Is there a queue? Is there any error log that I could look at? I am just unsure of where the file/folder sits that would trigger the processing for forum emails. 

Any help appreciated!


George

Average of ratings: -
In reply to george williams

Re: Forum emails not sending to all users-cron running

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

How frequently is your cron running?

That sounds (but I could easily be wrong!) as if your cron job is getting half way through the emails before starting to run again, which is why some of them then go out the next time its run and some a bit later again. You could try lengthening the time between cron jobs to see if that helps.

Is there anything else running through cron that could be taking significant time and prevent the cron completing? (e.g. automatic backups)

Richard

In reply to Richard Oelmann

Re: Forum emails not sending to all users-cron running

by george williams -

Thanks for the reply.

We have cron to set up to run every 30 mins and it takes about 8 mins to complete. We have other tasks, such as delete moodle cache and delete temp folder, but they are only run once a day. And I think it set to stop the task if it runs for more than an hour, so I don't know if it is that? I am starting to think that we had an upgrade of Microsoft Exchange servers recently, because I can't see it being a problem from Moodle end?


In reply to george williams

Re: Forum emails not sending to all users-cron running

by s w -

Did you find a resolution? We are seeing the same issue.

In reply to s w

Re: Forum emails not sending to all users-cron running

by george williams -

Hi,

I didn't find a solution to why it wasn't always sending out as part of the overall cron script, but I did find a workaround. In the end, we had to run the forum 'scheduled task' separately using, in my case,  task scheduler in Windows. All the forum emails then started sending out fine.  Obviously this is not ideal, as there didn't seem to be any logical reason why this was working intermittently as part of the cron job, but it averted a potential problem when semester kicked in again. Not sure how similar your problem is, but here are the documents that I used to set up an individual scheduled task.

https://docs.moodle.org/29/en/Administration_via_command_line#Scheduled_tasks

Regards