Cron for two web servers

Cron for two web servers

by Albert Ramsbottom -
Number of replies: 11

Cant remember but do I need to run the moodle cron on both of my web servers or just one.  Odd I have done this before on many occasions but I just cant remember?

 

Cheers

Average of ratings: -
In reply to Albert Ramsbottom

Re: Cron for two web servers

by jason everling -

That was bad advice! You DO NOT want to run cron on each server, odd things can start happening in your DB.

Pick one server and setup cron to run or setup a dedicated server to run cron if your cluster is beyond 2-3 web servers.

JASON

In reply to jason everling

Re: Cron for two web servers

by Albert Ramsbottom -

Yes Jason

I have had a look at a couple of other installations that I have built and these only have one cron

Cheers

In reply to jason everling

Re: Cron for two web servers

by Guillermo Madero -

Dear Mother of God!!! if you know something I don't about the OP set up, by all means, please share it smile

So... given that I'm not yet into some sort of psychic mind reading activity, my advice was based exactly on what was posted, nothing more, nothing less.

Moral of the history? People need to learn to give more info and stop assuming that those who spend time here trying to help them know every detail about the set up of their server(s). Dixi.

In reply to Albert Ramsbottom

Re: Cron for two web servers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
As usual, it depends!

If both your servers are web servers, and they jointly serve one Moodle instance (in some sort of a cluster), then only one server should run the Moodle cron job.

If those two web servers run different Moodle instances, then each Moodle instance needs a cron job. (Even a single Apache web server can run different Moodle instances on different domains by using its virtual hosts capability https://httpd.apache.org/docs/2.2/vhosts/index.html.)

If you mean this setup, https://moodle.org/mod/forum/discuss.php?d=238005, then it is _one_ web server and _one_ Moodle instance. Then one cron job is the right answer.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Cron for two web servers

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Visvanath,

Could you please check Moodle Docs at http://docs.moodle.org/25/en/Cron to verify that it has been updated correctly ?

Thanks in advance.

In reply to Germán Valero

Re: Cron for two web servers

by Albert Ramsbottom -

My god this post has descended in to halarity. I have no idea what is happening but if it helps things I did not stipulate that it was a load balanced environment

 

big grin

In reply to Albert Ramsbottom

Re: Cron for two web servers

by Guillermo Madero -

Hi Albert,

It seems that lack of info has lead to assumptions which in turn have wreaked havoc here black eye big grin

In reply to Guillermo Madero

Re: Cron for two web servers

by Albert Ramsbottom -

If only one could have a signature on these forums, we could post our setups automatically!

Mods,  martincan we have a sig section please, i understand that it might take 6 months to code and test, but it might stop us having a punch-up on these forums black eye

I know I broke the rules in my haste, I should have started the post with my environment details shy

In reply to Albert Ramsbottom

Re: Cron for two web servers

by Guillermo Madero -

Hi Albert,

At first instance it seems a good idea, but it would only clutter the threads; better yet, set ups can be described in our profiles smile

In reply to Albert Ramsbottom

Re: Cron for two web servers

by Guillermo Madero -

By the way, how did you end up setting your cron job? Do you have a complete Moodle installation (moodle, moodledata & database) at each server, or two Moodle sites accessing one database server?