Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71649

Reporting of schedule details not working for parameterized schedules

XMLWordPrintable

      The script below will pull the schedules for regular schedules, but cannot seem to pull for parameterized schedules.  Since parameterized schedules are based on the regular ones, I would have thought this should still work.

      I would like to know how to pull a summary report that includes the parameterized schedules.

      Are there new TriggerDescriptors configured?  Any different content a script would need to query?

       

      import hudson.model.*
      import hudson.triggers.*
      TriggerDescriptor TIMER_TRIGGER_DESCRIPTOR = Hudson.instance.getDescriptorOrDie(TimerTrigger.class)

      println ( "### CONFIGURED SCHEDULES ###" )
      println ( "---------------------------------------------------------------------" )

      for (item in Jenkins.instance.getAllItems(Job)) {
          def timertrigger = item.getTriggers().get(TIMER_TRIGGER_DESCRIPTOR)
          if (timertrigger)

      {             println ( item.getTriggers().get(TIMER_TRIGGER_DESCRIPTOR).spec + "    " + item.fullName )               println ( "---------------------------------------------------------------------" )     }

      }

            batmat Baptiste Mathus
            david_dean2 David
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: