Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Schedule Hudson on a VM via cron
Schedule Hudson on a VM via cron [message #1200291] Thu, 21 November 2013 06:58 Go to next message
Edouard Coissy is currently offline Edouard CoissyFriend
Messages: 2
Registered: November 2013
Junior Member
Hi all,

We happened to have installed Hudson (3.1.0) on a VM with Windows 7 Pro (ESXI). Hudson also has been configured as a service. Regarding the scheduling of cron jobs, Hudson always fails to start at the desired cron time. Although if someone connects with the browser (remote or local), it starts a job and defines the trigger als timely controlled. We've changed the trigger time to everything possible and checked the results for more than 3 weeks until now:

*/5 * * * * (every 5 minutes)
0 19 * * * (daily 7 p.m.)
0 23 59 * * (daily 11:59 p.m.)

From my point of view, it seems jetty might get in a standby mode and reactivates itself on client connect (browser), although the thread (java) has -Xrs parameter to prevent shutting Hudson down on logoff. Has anyone experienced the same behavior or any clue what else I can look for? Maybe it's also my VM going to standby mode, which I can't think of, but I'll check again.

And thanks for any replies.
Re: Schedule Hudson on a VM via cron [message #1209971 is a reply to message #1200291] Mon, 25 November 2013 20:05 Go to previous messageGo to next message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
You have listed three cron setting? Is all three stop working?

This project is set to run @daily and seems to work fine
https://hudson.eclipse.org/hudson-project/job/hudson-test-harness/

This project is set to run @hourly and seems to work fine
http://ci.hudson-ci.org/job/cobertura-plugin_hr/
(this Hudson runs in a VM, you can see it ran through out the night and I doubt any one accessed it via browser at that time)

In case you want to know, we start hudson like this in the VM

#!/bin/sh -x

TIMESTAMP=`date '+%y%m%d-%H%M%S'`

mv hudson.log hudson.log_$TIMESTAMP

HUDSON_HOME="/opt/hudson/perf_sandbox_home"
HTTP_PORT=7676
PREFIX="perf_sandbox"
HUDSON_WAR=hudson-war-3.1.0.war

HHTPS_PROXY=..
HHTP_PROXY=..

#HEAPSPEC="-Xmx4096m -XX:MaxPermSize=256m"
HEAPSPEC="-Xmx512m -XX:MaxPermSize=128m"
#HEAPSPEC="-Xmx128m -XX:MaxPermSize=128m" 

java -DHUDSON_HOME=${HUDSON_HOME} -Dhttps.proxyHost=$HTTPS_PROXY -Dhttps.proxyPort=80 -Dhttp.proxyHost=$HTTP_PROXY -Dhttp.proxyPort=80 $HEAPSPEC  -XX:-PrintGC -XX:-PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -jar $HUDSON_WAR   --httpPort=$HTTP_PORT --prefix=$PREFIX >& hudson.log &





Winston Prakash
Eclipse Hudson team
Re: Schedule Hudson on a VM via cron [message #1219886 is a reply to message #1209971] Fri, 06 December 2013 14:28 Go to previous message
Edouard Coissy is currently offline Edouard CoissyFriend
Messages: 2
Registered: November 2013
Junior Member
Hi Winston Prakash

Thank you for the response.

None of my examples are working, execpt when I remotely open hudson through the browser. Hudson even tries to run a job on the mentioned event (open browser), although it may not be the scheduled time at that moment.

I'm starting hudson with the executable file (*.exe), and installed a service (start type: automatic) as well. It seems that the compabillity feature from Windows is also affecting this behavior and I don't think setting this executable to run als "Administrator" will do the trick.

I will try your solution (create batch file and run hudson.war with java) and also install the batch file as a service. Maybe that will help...

It may be that the executable is only for testing purpose, specially on windows having those user security feature may influence hudsons behavior. I'll also keep the community updated with my experience.
Sorry for the absence, I just had other tasks prioritized in the meantime.

Previous Topic:Collabnet Authorization
Next Topic:Slave on Raspberry PI (Could not initialize class com.sun.jna.Native)
Goto Forum:
  


Current Time: Fri Apr 26 23:19:16 GMT 2024

Powered by FUDForum. Page generated in 0.03247 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top