News for hackers. Stuff that matters.
Re:Show HN: Crondom by SriniK on Thursday December 16, 2010 @03:24AM (#2011465)
I am ignorant on specific time requirements on running crontabs but I always do either 6min or 10min or something which is divisible.

Are there any specific app requirements in running 7min or 17sec?

Re:Show HN: Crondom by dfox on Thursday December 16, 2010 @06:52AM (#2011738)
Another problem with 17 seconds is that normal cron has resolution of one minute :)
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @07:20AM (#2011784)
screen -dmS 17secondjob perl -e 'while(1){`run the command`;sleep 17}'
Re:Show HN: Crondom by moeffju on Thursday December 16, 2010 @09:33AM (#2012119)
Or, simpler, use watch:

watch -n 17 -p command

Make a wrapper to run command in the background (&) if the process runtime is greater than your interval.

Re:Show HN: Crondom by xyzzyz on Thursday December 16, 2010 @08:13AM (#2011877)
This will not run the `command` in 17 seconds intervals. You need to take into account the amount of time that it takes to run it.
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @08:15AM (#2011886)
Ok. Whilst we're being anal:

screen -dmS 17secondjob perl -Mthreads -e 'while(1){threads->create(sub{`run the command`})->detach();sleep 17}'

Re:Show HN: Crondom by eru on Thursday December 16, 2010 @09:14AM (#2012056)
Or just use watch.
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @09:48AM (#2012174)
Cool. I was unfamiliar with this command. Looks useful.
Re:Show HN: Crondom by eru on Thursday December 16, 2010 @10:52AM (#2012394)
Look for `watch -p'.