help with cron

help with cron

by Sean S -
Number of replies: 7
I have created two users on my moodle account and replied to messages on the message board but got no email notices. I double checked and both users are subscribed to the forum.

I have attached my crontab to see if I set it up incorrectly. Perhaps I have put it in the wrong area of my server? Where exactly should it go?

Thank you for your help.
Average of ratings: -
In reply to Sean S

Re: help with cron

by Tim Allen -

Hi Linguist,

You have to customise the cron for you own site; it looks as though you just copied the path exactly from the docs page!

You have this in your crontab: 
*/5 * * * * wget -q -O /dev/null /www/path/to/admin/cron.php

It should be customised to your own moodle path.  Also, wget takes an http address, not a directory path.

So, it should be:
*/5 * * * * wget -q -O /dev/null http://seans-english.com/admin/cron.php

You can also run the cron manually through the browser to test it first.

Hope this helps,

Tim.

In reply to Tim Allen

Re: help with cron

by Sean S -
Thanks Timothy,

I set it up like that but it still isn't working, though when I manually ran the cron.php file it worked okay.
In reply to Sean S

Re: help with cron

by Tim Allen -

Hmm, how are you setting up the cron, using cpanel or some other way? I have only done it using cpanel on my shared webhost account, and using webmin on my own server.

Also, have you checked the time limit on forum posts?  Is it set to 30 minutes or another figure?  They aren't sent out to until after this period has elapsed...

Just thoughts,
Tim.

In reply to Tim Allen

Re: help with cron

by Sean S -
I changed the forum setting to 1 minute and tried again (posting another reply to a message); no luck.

I made the cron tab in notepad and ftp'd it up to my site. I checked the support forum and tutorials and I've got everything set up correctly as far as I can tell. I have sent a pm to one user on the host forums who is running moodle asking for help so I'll see what happens there.

At least I still have 2 weeks until my classes start to get this fixed.


In reply to Sean S

Re: help with cron

by Peter Kappe -

Hi Linguist,

Do you use a windows server and smtp?

I Just solved the same kind of problem. I Entered a SMTP servername to the moodle system variables and edited my php.ini file and entered the same smtp servername in the SMTP variable of php.ini. After that it worked (for me at least).

In reply to Sean S

Re: help with cron

by Matt Shaul -

Hi Linguist:

If you have access to a shell on the server, type in:

crontab -e

This will bring up your crontab in vi.  If you're familiar with vi, simpy enter the cron job there.  If you're not comfortable with vi, after entering the crontab -e command enter:

"i" (no quotes)

type in the cron job as in the file you uploaded

"ESC" (no quotes)

":" (that's a colon, no quotes)

"wq" (lowercase, no quotes)

Then enter the command crontab -l to see if it took (that's a lowercase "L").

Hope that helps

Matt

In reply to Sean S

Re: help with cron

by Sean S -
I got it working now with some help from one of the users on my hosts support forums.

Thanks for all the help everyone.