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

Expand and encourage use of hash syntax in crontabs

    Details

    • Similar Issues:

      Description

      Jenkins supports H in crontab specification to balance load across different times of day in a predictable yet natural way, so you do not get sudden spikes of activity. Special syntaxes like @daily use this automatically. And you can use it explicitly in five-field specs for more control.

      Yet the H syntax is not widely used, and it is not powerful enough to handle e.g. jobs which should be triggered every quarter hour. The result is terrible performance on large installations where a lot of people innocently configure triggers that all go off at once.

      Suggested changes:

      1. Expand the syntax to support e.g. H/15 * * * * for a trigger to run every fifteen minutes according to hash (e.g. 3, 18, 33, and 48 minutes past the hour).
      2. Update inline help to advocate hash syntax as the normal usage, and warn that misuse of exact times can overload the system.
      3. Provide form validation that flags use of exact times as a warning and suggests the hash syntax to use instead.
      4. Supply a standalone utility function which may be run to make that transformation in bulk across a bunch of job configs.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            cwozny Chris Wozny made changes -
            Labels performance trigger lts-candidate performance trigger
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate performance trigger 1.509.4-rejected performance trigger
            evernat evernat made changes -
            Link This issue is related to JENKINS-15027 [ JENKINS-15027 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 148145 ] JNJira + In-Review [ 192742 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: