Job management in Node

167 views
Skip to first unread message

Jatin Patel

unread,
Apr 4, 2013, 10:47:12 PM4/4/13
to nod...@googlegroups.com
Hi, I'm looking for a simple way to create a job and then execute that job after some delay time.

I've looked at several libraries including kue and background and ran into issues requiring me to install python, .net, etc.

Is there anything that has this basic functionality that is up to date with current libraries?  I'd prefer not to use coffeescript, just node.js.

Thanks in advance.

Scott Elcomb

unread,
Apr 4, 2013, 11:30:35 PM4/4/13
to nod...@googlegroups.com
On Thu, Apr 4, 2013 at 10:47 PM, Jatin Patel <jatin...@gmail.com> wrote:
> Hi, I'm looking for a simple way to create a job and then execute that job
> after some delay time.

What kind of job? If your job is essentially a function, there's setTimeout()

--
Scott Elcomb
@psema4 on Twitter / Identi.ca / Github & more

Atomic OS: Self Contained Microsystems
http://code.google.com/p/atomos/

Member of the Pirate Party of Canada
http://www.pirateparty.ca/

Martin Wawrusch

unread,
Apr 4, 2013, 11:32:09 PM4/4/13
to nod...@googlegroups.com

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





Jatin Patel

unread,
Apr 5, 2013, 9:15:55 AM4/5/13
to nod...@googlegroups.com
Essentially, it's a set of complex calculation that needs to be done every 10 minutes. Every 10 minutes, it would go and check for specific info (updated) in the db and then do the complex calculation.  I didn't wanted to use setTimeout() as I thought it wasn't ideal way to handle this - something like Quartz would be great.

Thanks-

Arnout Kazemier

unread,
Apr 5, 2013, 9:34:21 AM4/5/13
to nod...@googlegroups.com
"crontab"
--

Daniel Rinehart

unread,
Apr 5, 2013, 8:37:38 PM4/5/13
to nodejs
You might want to look at: https://github.com/mattpat/node-schedule

--

Michael Nisi

unread,
Apr 6, 2013, 9:00:11 AM4/6/13
to nod...@googlegroups.com
You could use setInterval.

Like here for exampe:
https://github.com/michaelnisi/troubled-www/blob/master/updater.js

Pedro Teixeira

unread,
Apr 6, 2013, 9:05:53 AM4/6/13
to nod...@googlegroups.com
My advise is to not mix those waters.
Use the simplest script you can and put it on cron if that fits.
If you need a job queue and workers, use kue or:
Code your custom queue consumer using that + core cluster.
Lots of options here depending on needs, load and scheduling.

--
Pedro

Michael Nisi

unread,
Apr 6, 2013, 9:14:02 AM4/6/13
to nod...@googlegroups.com
You should listen to Pedro.

Sent from Mailbox for iPhone

Azer Koçulu

unread,
Apr 8, 2013, 1:23:15 PM4/8/13
to nod...@googlegroups.com
shell-jobs is what you're looking for: http://github.com/azer/shell-jobs

I personally use it for 2 months and it works seamlessly

Charlie Edward

unread,
Apr 9, 2013, 5:51:39 AM4/9/13
to nod...@googlegroups.com
If your job can be executed in shell, crontab is a choice.
Other wise, if your job is a function, use some scheduler module or setInterval intead.
Pomelo-scheduler is originally a module of pomelo framework, it is quite efficient, and the usage is similiar to crontab.


To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages