1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to set up a cron job to run every minute - Hostgator won't allow me

Discussion in 'Site & Server Administration' started by lokielookies, Feb 7, 2009.

  1. #1
    I have a script that requires for a cron job to run every minute.

    Because I'm on shared hosting, Hostgator won't allow me.

    Is there a way to use the script without getting a dedicated hosting account?

    ;)
     
    lokielookies, Feb 7, 2009 IP
  2. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #2
    Keep your site on hostgator server and use another host to run cron who can allow you to run cron every minute. You will need to pay two hosts but I think there is no other way.

    Kailash
     
    kailash, Feb 7, 2009 IP
  3. darrenbeige

    darrenbeige Peon

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Freebie external cron services are available. Try a search.

    Note: A 1min cron is quite intensive. You may not find (apart from expensive services) any company who will be prepared to take on such a frequent cron
     
    darrenbeige, Feb 8, 2009 IP
  4. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #4
    Yes, most of external cron service allowed only every 5 min.

    You can try this cronjob service: SetCronJob. It's simple, fast, and easy to use.
    It will call your URL up to every 5 min, if you want.
     
    thuankkk, Feb 8, 2009 IP
  5. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #5
    how many cron jobs do they allow? 5 cron jobs ....betcha going to get kicked off the host though.
     
    shallowink, Feb 8, 2009 IP
  6. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #6
    Increase to 10 now :D I think 10 cron jobs are enough for most webmasters :)
     
    thuankkk, Feb 8, 2009 IP
  7. arcademan

    arcademan Active Member

    Messages:
    231
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #7
    A lot of times code can be redeveloped to get around using such an intensive cron job -- I would look into that rather than finding a way to run a cron every minute :)
     
    arcademan, Feb 8, 2009 IP
  8. SedNaX

    SedNaX Active Member

    Messages:
    1,326
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    90
    #8
    Just set it to run every 5 minuts and ignore the what the installation manual says. I really can't think of anything that will crash if it doesn't run every minute.
     
    SedNaX, Feb 9, 2009 IP
  9. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #9
    Depending on what kind of site this is, and what the cron job does, any script that runs every minute could bring even the most powerful server to its knees.

    Does the cron job "have" to run every minute? That seems a little extreme to me. Maybe set it to run once an hour and see what happens.
     
    ~kev~, Feb 9, 2009 IP
  10. darrenbeige

    darrenbeige Peon

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    What code are you using? Collectively, we might be able to edit it to reduce the frequency of the cron.
     
    darrenbeige, Feb 9, 2009 IP
  11. lokielookies

    lokielookies Well-Known Member

    Messages:
    1,246
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    150
    #11
    lokielookies, Feb 10, 2009 IP
  12. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #12
    with $24.95 USD per year?
     
    thuankkk, Feb 11, 2009 IP
  13. lokielookies

    lokielookies Well-Known Member

    Messages:
    1,246
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    150
    #13
    so far, they do as promised...
     
    lokielookies, Feb 11, 2009 IP