View Full Version : Need Cron To Run A .PHP File
vbreal
12-10-2006, 09:41 PM
what up VB Fam? I tried setting my cron on my server to run a PHP file for me but i can't seem to get it to work. Any tips on how to execute a php file via cron either with in cpanel or vb.
CyberAlien
12-11-2006, 01:11 PM
You can't just run php script in cron as linux doesn't know how to execute that file. Change permissions of that script to make it executable, and at the beginning of script add this:#!/usr/local/bin/php -q
Another method is to call php instead of script: /usr/local/bin/php /home/whatever/public_html/blah/cronscript.php
and make sure you put full path to your php script
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.