I used a script similar to this one to modify a job via the script console 
(http://[my_jenkins_url]/script ):

import hudson.triggers.*

midnightTrigger = new TimerTrigger("* * * * *")

job = Jenkins.instance.getItem("some jenkins job")
job.addTrigger( midnightTrigger )

for( trigger in vortexJob.triggers.values() ) {
  println( trigger )
  println( trigger.spec )
}

job.save()


For the sake of this example, I set it to run every minute.  The output is 
as expected:

hudson.triggers.TimerTrigger@7890613d
* * * * *


However, the job does not run every minute.  If I view the job via the web 
interface, I see that the job is scheduled to run every minute, but it simply 
does not run.  If I save using the web interface, then the job does run every 
minute.


Any idea why?


-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0a6381af-1c59-41d6-ab13-a677177cb2aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to