Cron Jobs and PHP

Sjoerd

New member
Joined
Jan 29, 2004
Messages
2
Location
Netherlands
I have a PHP script and i want to let it run every day automaticly by using the cron jobs. But when i enter the location of the .php file as command, i only receive errors.

How can i let the script run without errors?
 
Last edited:
Hello,

Just enter:
Code:
/usr/local/bin/php /home/username/path/to/file.php
as the command. A plain php script doesn't know how to execute itself unless it has the shebang line at the top (#!/usr/local/bin/php)

John
 
Back
Top