server load / crons

Post Reply
Kelevra
Posts: 99
Joined: Tue Mar 25, 2014 5:01 pm

server load / crons

Post by Kelevra »

Hello, I am having a server load issue... I am running around 20 Smartcj (only trade script)

My server support told to me do this with smartcj crons:
A better way might be to put all the crons in one file and trigger that one file periodically. This would prevent them from overlapping.

Can this be done without any trouble? will we be fine running Smartcj like that?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: server load / crons

Post by admin »

What kind of load do you see ?
CPU ? HDD ?
Don't forget to run script update
Kelevra
Posts: 99
Joined: Tue Mar 25, 2014 5:01 pm

Re: server load / crons

Post by Kelevra »

CPU....
I put all smarthumbs licenses running like that and now we are a lot better, but can I do the same with smartcj?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: server load / crons

Post by admin »

Don't forget to run script update
Kelevra
Posts: 99
Joined: Tue Mar 25, 2014 5:01 pm

Re: server load / crons

Post by Kelevra »

Is something like that in scj.sh, right?

cd /path_to_scj/bin/; env HTTP_HOST=domain1.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain2.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain3.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain4.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain5.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain6.com /path_to_php/php -q cron.php & sleep 2

or

cd /path_to_scj/bin/; env HTTP_HOST=domain1.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain2.com /path_to_php/php -q cron.php & sleep 4
cd /path_to_scj/bin/; env HTTP_HOST=domain3.com /path_to_php/php -q cron.php & sleep 6
cd /path_to_scj/bin/; env HTTP_HOST=domain4.com /path_to_php/php -q cron.php & sleep 8
cd /path_to_scj/bin/; env HTTP_HOST=domain5.com /path_to_php/php -q cron.php & sleep 10
cd /path_to_scj/bin/; env HTTP_HOST=domain6.com /path_to_php/php -q cron.php & sleep 12
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: server load / crons

Post by admin »

cd /path_to_scj/bin/; env HTTP_HOST=domain1.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain2.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain3.com /path_to_php/php -q cron.php & sleep 2
cd /path_to_scj/bin/; env HTTP_HOST=domain4.com /path_to_php/php -q cron.php & sleep 2
Don't forget to run script update
Post Reply