high-frequency cron jobs

high-frequency cron jobs

Posted by: mdiamond
Posted on: 2009-10-14 17:24:00

I have a cron job running every 5 minutes, and I'd like to kick up the frequency to once every minute. However, if I try selecting all the minutes on the Custom -> Minutes menu, the response is an error ("Too many minutes selected"). Is there a way for me to implement this manually? I'm not too experienced in creating cron jobs, so I'm not sure how well I would do outside of the DreamHost control panel.

Re: high-frequency cron jobs

Posted by: Atropos7
Posted on: 2009-10-14 17:52:00

See Crontab - Wiki

But keep in mind that if you try that on shared hosting, it might not work. There's no official word that I can find but a few people have claimed they can't get commands to run that frequently. Needing to run a command that frequently might be a sign you need to consider doing things differently as well.



Customer since 2000 cool openvein.org

Re: high-frequency cron jobs

Posted by: sXi
Posted on: 2009-10-15 14:57:00

Familiarise yourself with cron jobs before doing anything. One mistake in an automated script that leads to excessive CPU usage could result in your account being switched off to protect other accounts, or see you bustled onto a PS that you might not really require if you're on a shared server.

What is it that you want to run every minute, and why?




How To Install PHP.INI / ionCube on DreamHost

Re: high-frequency cron jobs

Posted by: mdiamond
Posted on: 2009-10-15 22:37:00

I'm creating a Twitter app that requires checking Twitter for mentions of my account, then processing those tweets and either reposting or redirecting them. The cron job just runs a small java jar file (200-something KB, I think), which performs all the necessary functions via the Twitter API. I'm pretty sure there's no way to have Twitter automatically process the tweets as they come in, since that would likely involve coding on the twitter server itself, not on the client end.

Anyway, updating every 5 minutes seems to be okay for now, but I just got whitelisted by Twitter (no more rate limiting) so I thought I would take advantage of my newfound freedom and have the software update more frequently.

(I should mention that the java program takes only a few seconds to run, and I don't think it eats up too much CPU power/time...)

Re: high-frequency cron jobs

Posted by: sXi
Posted on: 2009-10-16 00:09:00

Sounds like a really useful application. Everyone loves automated stuff!




How To Install PHP.INI / ionCube on DreamHost

Re: high-frequency cron jobs

Posted by: mdiamond
Posted on: 2009-10-16 10:13:00

Haha, hope that wasn't sarcasm (never sure on the internet). If you're curious, the project is http://twitter.com/TongueTip. I'm trying to see if I can use Twitter as a platform for crowdsourcing thesaurus requests... a fun little experiment.

Re: high-frequency cron jobs

Posted by: sXi
Posted on: 2009-10-16 14:25:00

Haha no sarcasm, the sentiment is genuine. I haven't been bitten by the Twitter bug myself, but do have a lot of "online buddies" who use it. No doubt I'll create an account one day.




How To Install PHP.INI / ionCube on DreamHost

Tags: cron jobjobs