|
|
#1 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,826 posts
Gave thanks: 103
Thanked 199 times
|
crons
A question.. I have something that I need to run nightly... I was going to set up a cron for this.. for some reason it is not working... Can crons run php files? If so, is there any specific things I need to do for that file? Also, any references to files in the php file, do I need to put the full path, or just the relative path..?
Thanks!
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|
|
|
#2 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,826 posts
Gave thanks: 103
Thanked 199 times
|
here's the error I am getting from the cron..:
Code:
/home/wpc/public_html/resources/val_send_vis.php: line 1: ?php: No such file or directory
/home/wpc/public_html/resources/val_send_vis.php: line 2: =@: command not found
/home/wpc/public_html/resources/val_send_vis.php: line 2: //check: No such file or directory
/home/wpc/public_html/resources/val_send_vis.php: line 3: syntax error near unexpected token `'/home/wpc/public_html/resources/test.csv''
/home/wpc/public_html/resources/val_send_vis.php: line 3: ` $lines=file('/home/username/public_html/resources/test.csv'); //the file we are going to open'
I can post the code of the file too, if needed..
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|
|
|
#4 (permalink) |
|
Skittles
Super #1
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,826 posts
Gave thanks: 103
Thanked 199 times
|
I got it to work, I needed to use this line: php -q /home/username/public_html/resources/val_send_vis.php
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people. |
|
|
|