title: Jenkins workflow check if job is running or schedulled
body: <p>is it possible to check if some job is running or scheduled from some workflow script?</p>
  
  <p>Although it may seems enough to manage concurrency using stages:</p>
  
  <pre><code>stage name: 'stageName', concurrency: 1 
  </code></pre>
  
  <p>and run builds in those stages like this:</p>
  
  <pre><code>build job: 'test-job', wait: false
  </code></pre>
  
  <p>it may happen that someone started the job <strong><em>test-job</em></strong> manually and I just want to handle that situation in my workflow script. For example by skipping the build or waiting till the build is finished.</p>