title: Jenkins cron check
body: <p>I need a groovy snippet in order to check that user scheduled the current job just to run once (for example '30 11 21 01 *')</p>
  <p>Is there a way to get in the pipeline the cron string?</p>
  <pre><code>pipeline {
    agent any
    stages {
      stage('run_upgrade') {
          
          ... CHECK CRON STRING ...
          
          when {
            beforeAgent true
            triggeredBy 'TimerTrigger'
          }
       }
  }
  </code></pre>
  <p>I cannot use others cron plugins. The instance is locked</p>
  <p>Riccardo</p>