title: How do Cron "Steps" Work?
body: <p>I'm running into a situation where a cron job I thought was running every 55 minutes is actually running at 55 minutes after the hour <strong>and</strong> at the top of the hour.   Actually, it's not a cron job, but it's a <a href="https://github.com/Indatus/dispatcher" rel="noreferrer">PHP scheduling application</a> that uses cron syntax.  </p>
  
  <p>When I ask this application to schedule a job every 55 minutes, it creates a crontab line like the following.</p>
  
  <pre><code>*/55 * * * *
  </code></pre>
  
  <p>This crontab line ends up <strong>not</strong> running a job every 55 minutes.  Instead a job runs at 55 minutes after the hours, and at the top of the hour.  I do not desire this. I've run this though a <a href="http://cron.schlitt.info/index.php?cron=*%2F55+*+*+*+*&amp;iterations=10&amp;test=Test" rel="noreferrer">cron tester</a>, and it verifies the undesired behavior is correct cron behavior.</p>
  
  <p>This leads me to looking up what the <code>/</code> actually means.  When I looked at the <a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5" rel="noreferrer">cron manual</a> I learned the slash indicated "steps", but the manual itself is a little fuzzy on that that means</p>
  
  <blockquote>
    <p>Step values can be used in conjunction with ranges.  Following a range with  "<code>&lt;number&gt;</code>" specifies  skips  of  the  number's value through the range.  For example, "<code>0-23/2</code>" can be used in the hours field to specify command    execution every other hour (the alternative in the V7 standard is "<code>0,2,4,6,8,10,12,14,16,18,20,22"</code>).  Steps are also  permitted after an asterisk, so if you want to say "every two hours", just use "<code>*/2</code>".</p>
  </blockquote>
  
  <p>The manual's description ("specifies  skips  of  the  number's value through the range") is a little vague, and the "every two hours" example is a little misleading (which is probably what led to the bug in the application)</p>
  
  <p>So, two questions:</p>
  
  <ol>
  <li><p>How does the unix cron program use the "step" information (the number after a slash) to decide if it should skip running a job? (modular division? If so, on what? With what conditions deciding a "true" run, and which decisions not? Or is it something else?)</p></li>
  <li><p>Is it possible to configure a unix cron job to run every "N" minutes?</p></li>
  </ol>