Lots of cronjobs at once?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Angry Jew Cat - Banned for Life
    (felis madjewicus)
    • Jul 2006
    • 20368

    #1

    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
    Confirmed User
    • May 2006
    • 781

    #2
    Originally posted by ismokeblunts
    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.
    hai2u

    Comment

    • VivoDan
      Registered User
      • Feb 2007
      • 17

      #3
      Originally posted by ismokeblunts
      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.
      Visit Porn.org for Free Porn - http://www.porn.org/

      Comment

      • baddog
        So Fucking Banned
        • Apr 2001
        • 107089

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

        Comment

        • CIVMatt
          Amateur Pimpin
          • Aug 2004
          • 13075

          #5
          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 )
          Make easy money with Webcams

          Comment

          • Swish
            Confirmed User
            • Mar 2006
            • 1421

            #6
            Good answers


            Naughty America - Director of Technology
            It's a CELEBRATION bitches!! For the hottest content promote Naughty America!
            swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com!

            Comment

            Working...