title: Setting Up Crontab to Execute a PHP Script in CentOS
body: <p>I have searched hell and high water for a solution to a problem I'm having in CentOS. I'm trying to set up a cron job that executes a PHP script. I was able to get this working using <code>wget</code>, but now that we are going into production, I need to find a way to do this whilst being more secure, as the cron job itself works with sensitive data.</p>
  
  <p>The error that I'm getting is: <code>-bash: php: command not found</code>.</p>
  
  <p>Now I've looked around and I've seen people having the same problem, but nothing has been able to help me get this working.</p>
  
  <p>For reference, here is what the working crontab looked like using the <code>wget</code> command.</p>
  
  <p><code>* * * * * wget <a href="http://www.domain.com/cron_script.php" rel="nofollow">http://www.domain.com/cron_script.php</a></code></p>
  
  <p>This is working fine, but I need to translate this into executing via PHP, rather than making an HTTP request to get the job done.</p>
  
  <p>Let me know if I left anything out.</p>