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

Add ability to specify parameters in the crontab

    Details

    • Similar Issues:

      Description

      I was missing the possibility to pass a parameter to a crontab line, so that I can do different things on different days.

      e.g.
      We have a linux that is built every day except Saturdays (~1h) and on Sundays we run a clean build (~10h), where Saturday is reserved for other projects that run a clean build.
      The only way for me was to create a conditional build step. It blows up the job configuration and gets decoupled from the crontab:
      So when someone changes the crontab from Sunday to Saturday for clean builds, he will also have to change the day in the conditional build step.

      My proposal is to extend the crontab syntax by something like:

      MIN HOUR DOM MONTH DOW % PARAM1=VALUE1,PARAM2=VALUE2

      This would than schedule a build with the given parameters.

      Would others be interested too?

        Attachments

          Activity

          Show
          batmat Baptiste Mathus added a comment - Please see https://wiki.jenkins.io/display/JENKINS/Parameterized+Scheduler+Plugin
          Hide
          fcodyc Cody Casterline added a comment -

          Was this fixed and added to Jenkins core, or is the "fix" to go use the Parameterized Scheduler Plugin?

          I ask, because I found parameterizedCron documented over at https://jenkins.io/doc/pipeline/steps/workflow-multibranch/ for the "Pipeline: Multibranch" plugin. However, despite having the latest version of the plugin listed at https://plugins.jenkins.io/workflow-multibranch (2.17), Jenkins still tells me:
          java.lang.NoSuchMethodError: No such DSL method 'parameterizedCron' found among steps

          Show
          fcodyc Cody Casterline added a comment - Was this fixed and added to Jenkins core, or is the "fix" to go use the Parameterized Scheduler Plugin? I ask, because I found parameterizedCron documented over at https://jenkins.io/doc/pipeline/steps/workflow-multibranch/  for the "Pipeline: Multibranch" plugin. However, despite having the latest version of the plugin listed at https://plugins.jenkins.io/workflow-multibranch  (2.17), Jenkins still tells me: java.lang.NoSuchMethodError: No such DSL method 'parameterizedCron' found among steps
          Hide
          danielbeck Daniel Beck added a comment -

          Cody Casterline Unfortunately the docs are structured by top-level element, in this case properties. Since that one allows you to specify any job properties, those will show up nested below it, no matter what plugin provides them.

          Show
          danielbeck Daniel Beck added a comment - Cody Casterline Unfortunately the docs are structured by top-level element, in this case properties . Since that one allows you to specify any job properties, those will show up nested below it, no matter what plugin provides them.
          Hide
          bassam_khouri Bassam Khouri added a comment -

          "Parameterized Scheduler" plugin's helpdoc has the following

           

          Clicking on "this Jenkins issue" points to this ticket.  Clearly, the original author the "Parameterized Scheduler" plugin has idea to integrate the plugin into the core.   This ticket should be reopened, or the help test from the "Parameterized Schedule" plugin should be updated.

          Show
          bassam_khouri Bassam Khouri added a comment - "Parameterized Scheduler" plugin's helpdoc has the following   Clicking on "this Jenkins issue" points to this ticket.  Clearly, the original author the "Parameterized Scheduler" plugin has idea to integrate the plugin into the core.   This ticket should be reopened, or the help test from the "Parameterized Schedule" plugin should be updated.
          Hide
          fatemahasta Fatema Hasta added a comment - - edited

          Baptiste Mathus Are we still available to use job dsl support for Parameterized Schedular for the Job dsl v 1.76? I am not able to get this plugin working 

          Show
          fatemahasta Fatema Hasta added a comment - - edited Baptiste Mathus Are we still available to use job dsl support for Parameterized Schedular for the Job dsl v 1.76? I am not able to get this plugin working 

            People

            • Assignee:
              batmat Baptiste Mathus
              Reporter:
              flozzone Florin Hillebrand
            • Votes:
              18 Vote for this issue
              Watchers:
              30 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: