GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Lots of cronjobs at once? (https://gfy.com/showthread.php?t=744275)

Angry Jew Cat - Banned for Life 06-19-2007 05:22 PM

Lots of cronjobs at once?
 
I have a large amount of cronjobs running now, with more and more executing every day. My question is this, should I be spreading my tasks out to execute throughout the day? will having a shitpile of cronjobs running at the exact same time (say midnight) strain my server or anything to negative effect?

ne0 06-19-2007 05:26 PM

Quote:

Originally Posted by ismokeblunts (Post 12626843)
I have a large amount of cronjobs running now, with more and more executing every day. My question is this, should I be spreading my tasks out to execute throughout the day? will having a shitpile of cronjobs running at the exact same time (say midnight) strain my server or anything to negative effect?

depends on what exactly those cronjobs do.
if they are heavy tasks it will just delay the process and make the server slow at those times, you could split then in a small interval, and it would be alright.

VivoDan 06-19-2007 05:33 PM

Quote:

Originally Posted by ismokeblunts (Post 12626843)
I have a large amount of cronjobs running now, with more and more executing every day. My question is this, should I be spreading my tasks out to execute throughout the day? will having a shitpile of cronjobs running at the exact same time (say midnight) strain my server or anything to negative effect?

Yup, if you give all your cronjobs the exact same start time, they'll all be started at once at that time.

It's usually a good idea to spread your cron jobs out over time, especially if any of them are going to do anything especially CPU/disk/database intensive. Running lots of tasks at the same time that all require the same resource will generally result in a longer run time than if you ran all the same jobs sequentially, due to task switching, disk head seeking, etc.

Another option to consider would be writing a simble bash script that will run your jobs in sequence, then just run the script from cron. Call it "nightlymaintenance.sh" or something. This can make for easier management as well, since you can just update the script, instead of adding a cron job every time you add a task.

Dan.

baddog 06-19-2007 05:33 PM

I would never recommend running them all at the same time, no matter what they are.

CIVMatt 06-19-2007 05:38 PM

I've shut down servers with too many cron jobs, stagger them out like 5 minutes apart, and dear god be on a dedicated server (like those at OC3Networks :))

Swish 06-19-2007 05:49 PM

Good answers :thumbsup


All times are GMT -7. The time now is 05:26 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123