I have this now but it doesn't seem to work:
<?php
if(file_exists("eos.csv"))
{
exec('php eos_update.php');
} else {
echo "File not found";
}
?>
eos.csv is in the same folder as this script (which is run by cron) and eos_update.php.
I changed the file to a full if/else statement to tell me if it could see the file and it returned true so there must be something i'm doing wrong elsewhere.
EDIT: This works when run via SSH (not logged in as root) but when run with a cronjob I get the following email:
public_html/imports/eos/eos_file_checker.php: line 1: ?php: No such file or directory
public_html/imports/eos/eos_file_checker.php: line 2: syntax error near unexpected token `"eos.csv"'
public_html/imports/eos/eos_file_checker.php: line 2: ` if(file_exists("eos.csv"))'
Cheers