Running php files via crontab

software development


I have added this command to my crontab (edited for privacy):
59 * * * * /home/user/

Now what this should do is cache the sizes of all my pages in This is being used to be like mod_bandwidth (I will release source later). However, I got this error:
/home/user/ line 1: ?: No such file or directory
/home/user/ line 2: =: command not found
/home/user/ line 3: =: command not found
/home/user/ line 4: =: command not found
/home/user/ line 5: =: command not found
/home/user/ line 7: syntax error near unexpected token (' /home/user/ line 7:$dateDayConfig = strval(date(d) - 1);’

It seems the server doesn’t think its php… anyone have any idea on how to fix this? I have a custom copy of php installed as well. So all php runs through:

Use “DCOUNTME” promo code when registering and recieve up to $85 off! (referer: saygoodbye)


You’ll have to tell cron to use php to run this file, or it simply treats it as standard shell scripting.

So it should look something like
59 * * * * /home/usernme/path/to/php /home.user/