amalanow
09-15-2007, 11:35 PM
I have a PHP file that I want to execute via a cron job. The php file pulls information from a database and sends an email if it finds a condition to be true. I can execute the page just fine in my browser and it does what it should, but when I set up a cron job to do it, I get an error emailed back at me. Here is what I get as an error:
"/home/username/public_html/architecture/emailcheck.php: line 1: ?php
: No such file or directory
/home/username/public_html/architecture/emailcheck.php: line 2: syntax error near unexpected token `('
/home/username/public_html/architecture/emailcheck.php: line 2: `$yesterdaysql1 = time() - (1 * 24 * 60 * 60);
'
Does anyone know how I can get a cron job to execute my php file?
"/home/username/public_html/architecture/emailcheck.php: line 1: ?php
: No such file or directory
/home/username/public_html/architecture/emailcheck.php: line 2: syntax error near unexpected token `('
/home/username/public_html/architecture/emailcheck.php: line 2: `$yesterdaysql1 = time() - (1 * 24 * 60 * 60);
'
Does anyone know how I can get a cron job to execute my php file?