How does running a cron on your server work in the following circumstance:
The script in your server is recieving hits and for the space of say 1 to 5 seconds a cron.php what it does is it actually stops the script from working.
OR
The script on your server receives the hits but the cron has no effect whatsoever on the effectiveness of your script because all a cron does is clean the database's logs, and logs happen always an instance after what the script has done.
thanks in advance for feedback.
3 replies to this topic
#1
Posted 13 December 2011 - 10:43 AM
|
|
|
#2
Posted 13 December 2011 - 07:25 PM
I am not sure what you mean by effectiveness, or stopping a script. Cron and PHP are hopefully separate processes, if it clears a log file then it will either clear it before or after the current scripts have ran. There is never really a "collision" where a log is written and cron clears it at the same time.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 22 December 2011 - 12:26 PM
Alexander said:
I am not sure what you mean by effectiveness, or stopping a script. Cron and PHP are hopefully separate processes, if it clears a log file then it will either clear it before or after the current scripts have ran. There is never really a "collision" where a log is written and cron clears it at the same time.
Thanks for the response.
What about server resources in a cron?
Say a server is under a lot of heat from concurrent connections coming in like nuts, I know it's a stretch to wonder this but does a cron consume a lot of server resources and hence worsen the capacity to deal with concurrent connections and therefore the script that depends on them?
#4
Posted 22 December 2011 - 04:08 PM
onething said:
Thanks for the response.
What about server resources in a cron?
Say a server is under a lot of heat from concurrent connections coming in like nuts, I know it's a stretch to wonder this but does a cron consume a lot of server resources and hence worsen the capacity to deal with concurrent connections and therefore the script that depends on them?
What about server resources in a cron?
Say a server is under a lot of heat from concurrent connections coming in like nuts, I know it's a stretch to wonder this but does a cron consume a lot of server resources and hence worsen the capacity to deal with concurrent connections and therefore the script that depends on them?
You can use a wrench to fix a space shuttle, however you'd be doing it inefficiently. If your cron job only rotates logs or something every time span (hopefully not every minute) then it will probably not cause any major effects.
You can always test with traffic, run a cron script doing whatever it does every ten seconds and record any errors of which may occur if your software is a little buggy if it cannot write as fast as it wants to (probably not an issue with PHP)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









