title: Add Laravel task to cron with parameters
body: <p>I want to add a Laravel task into cron, this is what I use to run it from command line (and runs succesfully)</p>
  
  <pre><code>php artisan cron:hourly --env=staging
  </code></pre>
  
  <p>Translated into cron:</p>
  
  <pre><code>/usr/bin/php -q /home/usr/public_html/staging/artisan cron:hourly --env=staging
  </code></pre>
  
  <p>I assume there is a problem with the parameter <code>--env=staging</code> because I got an error when the cron is executed (without this parameter I can't run the task in staging environment):</p>
  
  <p><code>Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user ''@'localhost'</code></p>
  
  <p>Could anyone explain me the the right syntax to execute the laravel task in cron? </p>
  
  <p><strong>Update</strong></p>
  
  <p>Actually, the problem is only happening if I place the cron command inside an SH script. Due to unknown reason, the script does not send "--env=staging" argument, and this ends on the error described.</p>