News for hackers. Stuff that matters.
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @01:38AM (#2011304)
This is my first real node.js product that I'm taking into production, and I'm looking for feedback. Thank You.

Please try to break it since it is really fresh. I should have the /etc/init.d stuff and a while true; do bash script set up, so it should come back if it crashes. I would like to have it not crash, but if it does, then things should come back online. It is using https://github.com/mathgladiator/win and https://github.com/mathgladiator/servy

Re:Show HN: Crondom by tjansen on Thursday December 16, 2010 @05:11AM (#2011624)
I haven't bothered to register yet, but after looking at the site I don't understand what it does. You say that it's a cron replacement. So is it a software package that you sell? For which platforms? Or is it some kind of SAAS that does something (like doing HTTP requests, or invoke something on my server using some unspecified protocol)?

I honestly don't have any idea what it does. All I know is that it does something in configurable intervals. I guess some additional info on the site would be helpful :)

Re:Show HN: Crondom by M1573RMU74710N on Thursday December 16, 2010 @06:56AM (#2011742)
I think it's a way to schedule a visit from a dominatrix?
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @09:53AM (#2012186)
It's basically an HTTP crontab replacement that does a bit more than crontab. Crontab is very regular where as crondom can be irregular. For instance, When there is a lot of events to handle, you want polling to be very fast (1 second resolution). However, where there are very few events, you want the polling to be very slow (every 2 minutes). crondom enables this use case by enabling the developer to determine how long to wait until the next hit.

You can also break up a cron job into # of clients. This enables you to process reasonable large # of clients by giving each client a URL to go with rather than doing the work at the moment. For instance, you want to pull 1000 user twitter feed every day. Well, if it takes 1 second, then you have 1000 seconds of work for the script, or 16 minutes. Most developers are forced to live within 30 seconds per request.

In this same scenario, what happens when it fails for user 377? what happens for 378? Handling errors is not always straight forward especially from a business case. Ideally, crondom will enable us to graph for failure cases (coming soon) and isolate which part of the cron task failed.

Re:Show HN: Crondom by makuro on Thursday December 16, 2010 @02:17AM (#2011366)
Why is it called Crondom? It sounds a bit like some form of 'protection' for cron.
Re:Show HN: Crondom by uuilly on Thursday December 16, 2010 @02:47AM (#2011404)
It's a perfect name b/c I don't need this tool now, but I probably will later. And I will never, EVER forget the name. Kudos.
Re:Show HN: Crondom by delano on Thursday December 16, 2010 @04:21AM (#2011546)
It's great to live in a time when developers can build products for other developers.
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @06:49AM (#2011735)
When was that ever not the case?
Re:Show HN: Crondom by delano on Thursday December 16, 2010 @10:15AM (#2012264)
The key word was products, i.e. making a living from building tools for other developers.

There are many more developer-run companies today than there were 10 years ago and the number will continue to grow. There have never been more opportunities to do that than right now.

Re:Show HN: Crondom by chc on Thursday December 16, 2010 @04:12PM (#2013711)
AFAIK, it's actually the opposite — only recently is this a hard thing, with the proliferation of OSS development tools.
Re:Show HN: Crondom by delano on Friday December 17, 2010 @11:51AM (#2016743)
OSS is an opportunity. It's not about the software; it's about the services and the ecosystem. There are a lot of people making money from Wordpress plugins, themes, and development.
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @10:05AM (#2012233)
I got the idea from pingdom.com , and then I put crondom.com together and my mind was utterly juvenile and told me "WOW, this is the best thing EVAR".
Re:Show HN: Crondom by catshirt on Thursday December 16, 2010 @04:03AM (#2011514)
I actually didn't even consider that far; I stopped after "why would you name your product something like condom".

To be fair, it's a solid idea that I imagine would do well regardless of the name. To continue being fair, it's hard to picture the name not being a point of friction in at least some scenarios For instance, picking the name out of a list of possible choices. There are unfortunately likely more limiting scenarios than that.

Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @09:56AM (#2012197)
I'll probably launch a better brand-name that's more family safe, but when I thought up this name my gut instinct was a giant "YES, this is so awesome".
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @11:22AM (#2012522)
You're not selling to families. You're selling to sysadmins and developers. Crondom is a perfect name.
Re:Show HN: Crondom by HeyLaughingBoy on Thursday December 16, 2010 @02:17PM (#2013215)
He's selling to sysadmins and developers many (most?) of whom will have to get management approval to purchase. The name can definitely be a limiting factor to sales.
Re:Show HN: Crondom by endlessvoid94 on Thursday December 16, 2010 @02:27AM (#2011380)
That was also my first thought.
Re:Show HN: Crondom by gibsonf1 on Thursday December 16, 2010 @03:11AM (#2011445)
I was thinking an image of a "hot babe" on the landing page would add a little more humor to the domain name.
Re:Show HN: Crondom by moeffju on Thursday December 16, 2010 @09:31AM (#2012115)
No, it would merely add sexism. Don't be sexist.
Re:Show HN: Crondom by alanh on Thursday December 16, 2010 @02:15AM (#2011362)
Would be hilarious if the UI was a text box where it said “type a Crontab line.”

Seriously though, sounds easy to use, if perhaps a bit overpriced for something I’d mostly want to use on small or personal projects.

Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @05:45AM (#2011660)
It strikes me as the sort of thing that should be one function of a much larger app. Not a standalone app on its own. If the intention is to make it a paid for service, I simply don't think it's worth paying for. Other people might be willing to pay for it, but I'm not sure exactly who.
Re:Show HN: Crondom by IgorPartola on Thursday December 16, 2010 @08:09AM (#2011868)
Some of the features sound neat. The question in my mind is, how do the jobs on the Crondom server trigger local scripts? Also the name is both cool and terrible: it reads like condom everytime I glance at it.
Re:Show HN: Crondom by npad on Thursday December 16, 2010 @02:12AM (#2011351)
"10 Things you can do with crondom.com that you can't do with crontab: 1. Run a job every 7 minutes"

I thought you could just do:

  */7 * * * * whatever...
Re:Show HN: Crondom by liuliu on Thursday December 16, 2010 @02:19AM (#2011368)
I don't know. It feels like with this line, the job will be run at 7, 14, 21, 28, 35, 42, 49, 56, thus, between 56 and the next 7, you will have 11 minutes interval. Not that familiar with crontab, I may be wrong here.
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'.
Re:Show HN: Crondom by jackowayed on Thursday December 16, 2010 @02:29AM (#2011384)
Correct
Re:Show HN: Crondom by yycom on Thursday December 16, 2010 @02:51AM (#2011410)
How else would you divide 60 by 7?
Re:Show HN: Crondom by chriskelley on Thursday December 16, 2010 @02:56AM (#2011420)
I think the idea is that instead of:

    7, 14, 21, 28, 35, 42, 49, 56,(11 min gap), 7, 14, etc
Crondom would run:

    7, 14, 21, 28, 35, 42, 49, 56, 3, 10, 17, 24, ..., n+7

OP correct me if I'm wrong with the intention of that bullet point.
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @05:43AM (#2011657)
If it's that important that a job runs at exactly 7 minute intervals, you don't want to be relying on a remote service.
Re:Show HN: Crondom by derefr on Thursday December 16, 2010 @02:56AM (#2011419)
You don't. You divide 60*7 by 7.
Re:Show HN: Crondom by bmelton on Thursday December 16, 2010 @07:47AM (#2011830)
You want me to run it every hour?
Re:Show HN: Crondom by mike-cardwell on Thursday December 16, 2010 @09:56AM (#2012193)
You misunderstand what he's saying. Because 60 doesn't divide into 7, don't use one 60 minute cron job. Use 7 cron jobs. You could get this magical 7 minute experience over a 24 hour period by creating the following 7 jobs:

0-56/7 0-21/7 * * * Command

3-59/7 1-22/7 * * * Command

6-55/7 2-23/7 * * * Command

2-58/7 3-17/7 * * * Command

5-54/7 4-18/7 * * * Command

1-57/7 5-19/7 * * * Command

4-53/7 6-20/7 * * * Command

Of course, the last job would finish at 23:55, and the next start at 00:00 which is bad. So you'd need to do it on a per day basis. Luckily there are 7 days in the week. So you would just need to write those 7 jobs above on a per day basis. You'd end up with 49 jobs all looking similar to this:

0-56/7 0-21/7 * * Wed Command

Re:Show HN: Crondom by omh on Thursday December 16, 2010 @09:52AM (#2012185)
Well, you could put multiple cron lines in. e.g. for every 8 minutes:

  0,8,16,24,32,40,48,56 0,2,4,6,8,10,12,14,16,18,20,22 * * * cmd
  4,12,20,28,36,44,52 1,3,5,7,9,11,13,15,17,19,21,23 * * * cmd
This starts to get a bit silly when the interval isn't a factor of 24 though.
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @10:26AM (#2012297)
I wrote a simple script to generate cron tab specs for "every X minute", and while I enjoyed using gcd and lcm in a real application; something wasn't right. 7 is a very canonical and crazy case because it takes 7 days to cycle. but even then, it doesn't work with months except for February for non leap years.
Re:Show HN: Crondom by lhnn on Thursday December 16, 2010 @02:13AM (#2011356)
*/7, but ya.

That is a Linuxism. I found out the hard way setting up some Solaris 9 scripts last summer.

Re:Show HN: Crondom by there on Thursday December 16, 2010 @10:30AM (#2012315)
it's a vixie cron'ism. vixie cron is in all the bsds, linuxes, and mac os.
Re:Show HN: Crondom by tzs on Thursday December 16, 2010 @04:43AM (#2011584)
It is in OS X cron too.
Re:Show HN: Crondom by jarin on Thursday December 16, 2010 @02:26AM (#2011379)
Hey, just a small thing but when trying to sign up it's saying my [email protected] email address is invalid.
Re:Show HN: Crondom by cj on Thursday December 16, 2010 @02:48AM (#2011405)
Side note: Registration rejects [email protected] as an invalid email.
Re:Show HN: Crondom by nicksergeant on Thursday December 16, 2010 @08:49AM (#2011976)
Site seems to be down. Would love to check it out, though.
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @09:57AM (#2012198)
I'm learning a lot about production node.js and what happens when things go very wrong... Will blog about it.
Re:Show HN: Crondom by m_eiman on Thursday December 16, 2010 @03:43AM (#2011492)
Adding a bit of info about what I'd need to implement on my end would be useful. I'm assuming that this will fetch a HTTP URL once per "hit"?
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @09:59AM (#2012208)
I'll make that generally accessible from the landing page, and It's available within the site.

http://crondom.com/documentation

(very hastily written)

Re:Show HN: Crondom by jules on Thursday December 16, 2010 @09:18AM (#2012068)
Awesome name. The site is down though. Edit: back up now.
Re:Show HN: Crondom by jayeshsalvi on Thursday December 16, 2010 @06:35AM (#2011721)
Can it do: Twit Goodbye when I die. ?
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @10:03AM (#2012228)
No, but that does sound like an interesting service. ObitWatch
Re:Show HN: Crondom by pshirishreddy on Thursday December 16, 2010 @03:56AM (#2011506)
why not put an openID login. I find a lot of new review my app's but every app I find points me to register as a new user. Why doesn't it use some thing like openID where I can easily login to test it for my needs.
Re:Show HN: Crondom by mathgladiator on Thursday December 16, 2010 @10:02AM (#2012225)
I plan to add that to the standard win user system ( https://github.com/mathgladiator/win/blob/master/pages/std.w... ).