multiple servers and cron setup

09Feb2012

Hi

The cron task is running every minute. And every minute a request is made for http://somehost/cron.php?xxxx. In a multiple physical server setup (app, admin, job, upload etc), should the cron job run on every individual server or just on one server? And which one would that be? Should it run on the server acting as the admin?
The next question I have is what the url (http://server/cron.php?xxxx) should be. When cron is running on the admin server should it do a request to http://adminserver/cron.php or some other server (app?)

Thanks, Tom

Comments

We have a setup with multiple

We have a setup with multiple servers and the cron is running on the admin server. Since all servers share the same database this seems fine to only run it on one server. Not completely sure though.

Thank you for your response.

Thank you for your response. I have set it up like this also but I'm not entirely sure.
Another question I have is about the configuration of the internal REST calls on the /admin/mediamosa/config/global page. Do you point this to the admin server or to the app (public REST interface) server?

You should trigger the 1

You should trigger the 1 minute cron on 1 machine, ideally the jobschedular server.

You have defined multiple jobservers on the admin/mediamosa/config/server (mediamosa >> configuration >> Servers) page.

Only 1 of them is the jobschedular and distributes all jobs. see: mediamosa >> configuration >> configure medimosa global settings >> server settings. (Normally the first jobserver).

Okay, I can switch the one

Okay, I can switch the one minute cron from admin server to job1 server.
At the moment the cron looks like this:

* * * * * /usr/bin/wget -O - -q -t 1 --header="Host: ouradminserver.nl" http://localhost/cron.php?cron_key=xxxxxx >/dev/null 2>&1

So it does a request for /cron.php. This works on the admin server but on job1 and job2 this results in 404 because
job1 and job2 only have the REST interface:

App interface: Enabled
Upload interface: Disabled
Download interface: Disabled
Admin interface: Disabled

Should I adjust the cron on job1 and do a request from job1 tot adminserver /cron.php? Like this:

* * * * * /usr/bin/wget -O - -q -t 1 --header="Host: ourjob1server.nl" http://ouradminserver.nl/cron.php?cron_key=xxxxxx >/dev/null 2>&1

Tom, It is enough if you use

Tom, It is enough if you use your cron on the admin server.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.