Results 1 to 13 of 13
  1. #1
    Slawete is offline Public Member
    Join Date
    September 2016
    Posts
    131
    Thanks
    74
    Thanked 59 Times in 45 Posts

    Default Best time for cron jobs

    I've just created a cron job for my site. Was thinking about the right time since the task of the cron is not easy one and over time it could take more time to be executed. I didn't measure any figure about when my website is mostly visited since this is something that permanently is changing. To me it seems that 5:00 - 8:00 PM is appropriate. I'd like to know your opinions about the time of the day when these kind of tasks in the back-end should be done.

    Thank You!

  2. #2
    Sherlock's Avatar
    Sherlock is offline Public Member
    Join Date
    December 2013
    Location
    WC
    Posts
    4,668
    Thanks
    1,357
    Thanked 3,619 Times in 2,039 Posts

    Default

    It depends on traffic and website. Ask your GA. If you have a worldwide traffic leaning to EUandUSA, the best time for crons is approx 2-6 AM GMT.
    But you must know your traffic. No one else knows your traffic better than you.
    If you talk to God, you are praying; If God talks to you, you have schizophrenia.

  3. The Following 4 Users Say Thank You to Sherlock For This Useful Post:

    DanHorvat (22 May 2020), Slawete (17 May 2020), universal4 (17 May 2020), WagerX (18 May 2020)

  4. #3
    WagerX's Avatar
    WagerX is offline Public Member
    Join Date
    March 2006
    Posts
    2,272
    Thanks
    78
    Thanked 92 Times in 70 Posts

    Default

    Quote Originally Posted by Sherlock View Post
    It depends on traffic and website. Ask your GA. If you have a worldwide traffic leaning to EUandUSA, the best time for crons is approx 2-6 AM GMT.......
    yup, I agree. Also, I spread the cron jobs out so they do not cluster too close. If there is a failure, it's easier to track down which ones ran.

    If it's a back up, I like to perform it 1-2 AM from the time zone the server uses.

  5. The Following User Says Thank You to WagerX For This Useful Post:

    Slawete (18 May 2020)

  6. #4
    Sherlock's Avatar
    Sherlock is offline Public Member
    Join Date
    December 2013
    Location
    WC
    Posts
    4,668
    Thanks
    1,357
    Thanked 3,619 Times in 2,039 Posts

    Default

    Also if you have shared servers try not to do the crons at :00 (bc. many others might run it as well). Ideal is to make it at :23 or :47, but then the cron has to be adjusted.
    If you talk to God, you are praying; If God talks to you, you have schizophrenia.

  7. The Following 2 Users Say Thank You to Sherlock For This Useful Post:

    Slawete (19 May 2020), WagerX (20 May 2020)

  8. #5
    allfreechips's Avatar
    allfreechips is online now Private Member
    Join Date
    August 2010
    Location
    Ohio - The taxing state
    Posts
    1,280
    Thanks
    165
    Thanked 706 Times in 430 Posts

    Default

    really shouldnt matter unless the cron is a CPU/memory killer or locks tables. Will run independent of other threads
    Allfreechips online casino guide offers online casino reviews from our members. Also our exclusive No Deposit casino bonuses are always up to date. See the latest slot machine reviews at Hotslot and exclusive no deposit casino bonuses as well with a good dose of daily online gambling news to learn about pokies

  9. #6
    Sherlock's Avatar
    Sherlock is offline Public Member
    Join Date
    December 2013
    Location
    WC
    Posts
    4,668
    Thanks
    1,357
    Thanked 3,619 Times in 2,039 Posts

    Default

    For us, it matters. During heavy traffic we disable crons completely. It is a matter of multiplying servers.
    If you talk to God, you are praying; If God talks to you, you have schizophrenia.

  10. #7
    Slawete is offline Public Member
    Join Date
    September 2016
    Posts
    131
    Thanks
    74
    Thanked 59 Times in 45 Posts

    Default

    Quote Originally Posted by Sherlock View Post
    Also if you have shared servers try not to do the crons at :00 (bc. many others might run it as well). Ideal is to make it at :23 or :47, but then the cron has to be adjusted.
    I'm on cloud server with a worldwide traffic. Currently not that big. I'm tracking every click on any of visit-buttons. What I did was calculating the number of clicks for every our after midnight.

  11. #8
    Sherlock's Avatar
    Sherlock is offline Public Member
    Join Date
    December 2013
    Location
    WC
    Posts
    4,668
    Thanks
    1,357
    Thanked 3,619 Times in 2,039 Posts

    Default

    Probably you should not care if you pay the real cloud server. But. I am not an expert. I have dedicated servers with an expert. He told me that most if not all cloud servers are just better VPSes. Test the performance during crons. If you have no issues, just let it be. If you do crons once a day, after midnight and the process is max few minutes and your traffic is more or less evenly distributed it is most likely no problem. There can be a problem if you have regular spikes in traffic and during those spikes you need to run the crons.
    If you talk to God, you are praying; If God talks to you, you have schizophrenia.

  12. The Following User Says Thank You to Sherlock For This Useful Post:

    Slawete (20 May 2020)

  13. #9
    WagerX's Avatar
    WagerX is offline Public Member
    Join Date
    March 2006
    Posts
    2,272
    Thanks
    78
    Thanked 92 Times in 70 Posts

    Default

    Quote Originally Posted by Sherlock View Post
    Also if you have shared servers try not to do the crons at :00 (bc. many others might run it as well). Ideal is to make it at :23 or :47, but then the cron has to be adjusted.
    Oh yes, that's a good point. I've been on a dedicated server and totally forgot about this one. I can't imagine how many wordpress apps backing up at the same time at 00:00 AM.

  14. #10
    webwiser is offline Private Member
    Join Date
    May 2020
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Depends also what country you are targetting and what is your own region. if you are in UK and target UK users then set it for 5am. If you are in UK and targetting US users then you need to set it to 10/11am to avoid cron load / cache clear etc effecting your user visits

  15. #11
    universal4's Avatar
    universal4 is online now Forum Administrator
    Join Date
    July 2003
    Location
    Courage is being scared to death...and saddling up anyway. John Wayne
    Posts
    32,686
    Thanks
    4,008
    Thanked 8,840 Times in 5,650 Posts

    Default

    There is not right answer for everyone.

    This decision should be based on Geo's targeted, server load based on YOUR traffic not your neighbors.

    Also, no one mentioned server location.

    Keep in mind if you target a number of different countries and geo's but your server is located in the UK as an example, 11am will be 111am SEVER TIME, so be sure to adjust accordingly.

    Rick
    Universal4

  16. #12
    Sherlock's Avatar
    Sherlock is offline Public Member
    Join Date
    December 2013
    Location
    WC
    Posts
    4,668
    Thanks
    1,357
    Thanked 3,619 Times in 2,039 Posts

    Default

    I mentioned time zone. That I thought implies that one has to think in time zones.

    Speaking about this many years ago I arbitrarily chose one time zone (yes it is the server time of our servers in Europe) and when we speak about some time, we always speak in terms of this time zone. Employees have set this time zone in their computers anywhere they are in the world.

    Funny was when we were on completely different continent and we were about to go to the dinner at certain time. The employee asked me whether to use the server time or the time of the country where we are were in. So I had to make an exception how to express time for offline activities (which was indeed even further confusing).
    If you talk to God, you are praying; If God talks to you, you have schizophrenia.

  17. #13
    CuriousCoders is offline Public Member
    Join Date
    July 2020
    Posts
    23
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    We do multiple chrons daily for each site. If there is no cost for each additional job you might as well run several throughout the day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •