problem in sending email

problem in sending email

by m question -
Number of replies: 4

Hi,

I use Moodle 2.7 , I noticed that emails are not sent to users until I run cron manually via cmd .

I run cron using task scheduler dailly every 5 minutes.

history of task scheduler shows the task run successfully. I also use the task scheduler for external database enrol cron and it runs without problems. but in Moodle cron does not send any email.

I hope you can help me to find what is the problem. it is highly important that emails for forums and assignments be sent .


Thanks

Average of ratings: -
In reply to m question

Re: problem in sending email

by Paul Verrall -

It would be useful to check the output from your scheduled cron jobs as this will detail exactly what is happening rather than just a 'ran? yes/no' from your OS scheduler.

I'm not really familiar with output redirection on windows, but a quick google suggests it is much like Linux

I think it is good practice (as I do it wink) to have cron output appended to a log file which is rotated regularly so you may always check back and investigate any issues.

In reply to Paul Verrall

Re: problem in sending email

by m question -
thank you for help,
I could not figure how to redirect the cron output using task scheduler in windows. when I tried
c:\path to \php.exe -f c:\path\to\cron > c:\path to log
gave me syntax error .task scheduler shows that result of previous task run is 0xFF which means the task does not run correctly. I am searching in stackoverflow , I would appreciate if someone here used windows task scheduler to help me


thanks

In reply to m question

Re: problem in sending email

by m question -

actually it was not peoblem of sending email, the cron was not running correctlly via task scheduler (though some times it did !)


however , in the settings of cron task make sure that in General tab ,"run with highest privileges" is checked , that was the problem. now cron runs well . I want to log the output of cron but it did not work till now .


Thanks