User Tools

Site Tools


cron_crontab_settings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cron_crontab_settings [2014/01/29 18:04] (current)
Line 1: Line 1:
 +====== Cron Settings ======
 +
 +Crontab ​ - is a part of any *NIX OS. It runs some programs at defined time. Smart Trade Script uses it to collect and optimize stats
 +
 +If you see notine "check crontab"​ in Main tab that means you have to check crontab .
 +It should be like 
 +
 +   copy from here: */1 * * * * cd /​path_to_scj/​bin/;​ env HTTP_HOST=yourdomain.com /​path_to_php/​php -q cron.php
 +
 +If you use internal thumbs rotation engine also all this
 +
 +   copy from here: */1 * * * * cd /​path_to_scj/​bin/;​ env HTTP_HOST=yourdomain.com /​path_to_php/​php -q rot.php
 +
 +===== If you havea lot of domains at one server =====
 +
 +it's a good idea to spread load across a minute. Create file scj.sh and add there all tasks **( without * and with & at the end  )** for example ​
 +
 +<​code>​
 +  cd /​path_to_scj/​bin/;​ env HTTP_HOST=yourdomain.com /​path_to_php/​php -q cron.php &
 +  sleep 2
 +  cd /​path_to_scj2/​bin/;​ env HTTP_HOST=yourdomain2.com /​path_to_php/​php -q cron.php &
 +</​code>​
 +
 +Change sleeptime so all of your tasks are executed within 1 minute, it's important.
 +
 +and add this file to crontab
 +
 +<​code>​
 +*/1 * * * * cd /​path_to_sh_file/​ ; sh scj.sh
 +</​code>​
 +
 +
 +**NOTE** total amount of sleep seconds should be less then 59, if you have more lines - add sleeps each 2 lines for example.
  
cron_crontab_settings.txt ยท Last modified: 2014/01/29 18:04 (external edit)