Hi all,
We get this question from time to time as a support ticket, so figured it would make sense to post both the question and answer here for the benefit of all...
If you have a heap of domains hosted on the same site (each with their own subdirectory), how do I setup the cron job?
e.g. Let's say you have your normal public_html folder and your add on domains have a sub folder called domain1.com and domain2.com
So the path might look like this....
/home/tgb001/public_html
/home/tgb001/public_html/domain1.com
/home/tgb001/public_html/domain2.com
etc
So the question is, when setting up the cron job, where does the cron.php file go?
The answer is it goes anywhere you want a cron job to operate, once for each domain.
So if you have 1 domain you set it up once, if you have 100 domains, you set it up 100 times.
Set it up in the relevant folder for each domain.
We do it this way for two main reasons.
1. In case you do not want a cron job for a given domain.
2. To allow you to individually decide different cron settings for each domain.
3. Post schedule - If there was a single cron job and you had (say) 100 domains, then 100 domains would get processed for each cron job, and given that a cron job can only operate for a short period of time, would ultimately mean your posts would take a long long time to process.
4. Footprints - If you had multiple posts being processed from different domains at the exact same time, you are associating multiple domains with the one process, which could be a bad thing.
So in Summary, you need to create a cron job for each domain you wish to use cron with. Remember that the cron setting is really only useful for existing posts.
If you have a new domain and/or only want to process posts you create and publish from this point forwards, there is no need to use the cron process at all.
I hope this explains it.
Cheers
Tim



LinkBack URL
About LinkBacks





Reply With Quote
