restart a nodejs app

17 views
Skip to first unread message

GBANE FETIGUE

unread,
Dec 16, 2015, 9:11:43 PM12/16/15
to Jenkins Users
Hey Folks,

I am trying to create a jenkins job to restart a nodeJs API that I am having on my server( /etc/init/ovrc-dashoard-api). that's job need to be running the job every hour(@hourly).
again the app is a nodejs app and is located on a server.
all i need is an idea how to restart the API (nodejs app) hourly by running a script .

Thanks

Richard Bywater

unread,
Dec 16, 2015, 11:10:26 PM12/16/15
to Jenkins Users
I'm interested in why you would use Jenkins when cron would seem to be a better fit? 

Aside from that, you haven't said what OS/distro you are dealing with but assuming that ovrc-dashboard-api follows the standard pattern then using cron to run a shell script something like "service ovrc-dashboard-api stop && service ovrc-dashboard-api start" would probably do the trick.

Richard.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a567c634-213c-4739-9363-479d77a16414%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

GBANE FETIGUE

unread,
Dec 17, 2015, 6:29:53 AM12/17/15
to Jenkins Users
Thanks for responding me
I am using ubuntu 12.04 I just to have jenkins take care of that
Reply all
Reply to author
Forward
0 new messages