title: Laravel schedule - hourly, daily - understanding when exactly start
body: <p>Example from Laravel <a href="https://laravel.com/docs/5.5/scheduling" rel="nofollow noreferrer">documentation</a>:</p>
  
  <pre><code>protected function schedule(Schedule $schedule)
  {
      $schedule-&gt;call(function () {
          DB::table('recent_users')-&gt;delete();
      })-&gt;daily();
  }
  </code></pre>
  
  <p>Notice the <strong>daily</strong>  function.  </p>
  
  <p>I  can't figure out , how will it find out at what time to start?
  Will it always start at midnight or at random floating time? </p>
  
  <p>I tried to read the source code:</p>
  
  <pre><code>/**
   * Schedule the event to run daily.
   *
   * @return $this
   */
  public function daily()
  {
      return $this-&gt;spliceIntoPosition(1, 0)
                  -&gt;spliceIntoPosition(2, 0);
  }
  </code></pre>
  
  <p>So I checked spliceIntoPosition function: </p>
  
  <pre><code>    /**
   * Splice the given value into the given position of the expression.
   *
   * @param  int  $position
   * @param  string  $value
   * @return $this
   */
  protected function spliceIntoPosition($position, $value)
  {
      $segments = explode(' ', $this-&gt;expression);
  
      $segments[$position - 1] = $value;
  
      return $this-&gt;cron(implode(' ', $segments));
  }
  </code></pre>
  
  <p>And eventually I got totally lost. Any ideas how it behaves?</p>