icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old March 22nd, 2006, 5:46 PM   #1 (permalink)
Skittles
Super #1
 
DewKnight's Avatar
 
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.
DewKnight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 22nd, 2006, 5:47 PM   #2 (permalink)
Skittles
Super #1
 
DewKnight's Avatar
 
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 replaced the username...

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.
DewKnight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 22nd, 2006, 6:21 PM   #3 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
what's the cron line look like?

I have 3 php crons running on my site now
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 22nd, 2006, 7:45 PM   #4 (permalink)
Skittles
Super #1
 
DewKnight's Avatar
 
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.
DewKnight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old March 22nd, 2006, 7:49 PM   #5 (permalink)
All Ur Base R Belong 2 Us
Excelling Contributor
 
mr_fern's Avatar
 
Joined in Feb 2005
Lives in Vegas & New York
824 posts
Gave thanks: 2
Thanked 6 times
cool
__________________
Nobody doing nothing
mr_fern is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On