title: How to run php command but from php script
body: <p><strong>TL;DR: I need to run a command, but only thing I can do on my hosting is visiting URL. Is there way around it?</strong></p>
  
  <p>I am trying to set up Cron on my hosting and the manual tells me:</p>
  
  <p>Set up cron to run this command:</p>
  
  <pre><code>php /path/to/mautic/app/console mautic:leadlists:update --env=prod
  </code></pre>
  
  <p>But problem is, that my hosting (possibly from security/marketing reasons) allows running only URLs as cronjobs.</p>
  
  <p>So while I can set up running php script from url:</p>
  
  <pre><code>   0 0 23 1/1 * ? * http://example.com/cronjobs.php
  </code></pre>
  
  <p>I cannot run actual commands as given example above.</p>
  
  <p><strong>Is there a way of workaround?</strong></p>
  
  <p>Can I somehow write "usual" php script which will emulate running the first example?</p>