• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

PHP cron logistics

I'm trying to run as a daily cron job a PHP script.
I've tested it in a web browser, and it works fine (and am not worried about http accesses)
I've changed the protection, so executable is okay.

The first few lines of the file are:
<?PHP
//  daily batch job 

Open in new window


And the error message is (note that got as far as executing the file):
cron.php: line 1: ?PHP: No such file or directory
line 2: //: is a directory

Open in new window


what did i set up incorrectly
0
willsherwood
Asked:
willsherwood
  • 2
1 Solution
 
Rik-LeggerCommented:
How did you entered the crobjob?
Something like this?


0 0 * * *  php /path/to/local/php/file.php
0
 
willsherwoodAuthor Commented:
YAY that was it.   adding PHP prior to the  path/script
0
 
willsherwoodAuthor Commented:
thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now