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.

» Surpass Web Hosting Forums » Discussions » Private Hosting » Question About Cron

Private Hosting Questions about VPS, dedicated servers and colocation.

Reply
 
LinkBack Thread Tools Search this Thread
Old January 20th, 2008, 8:26 PM   #1 (permalink)
Surpass Fan
Excelling Contributor
 
fury's Avatar
 
Joined in Dec 2005
Lives in MN > USA
Hosted on pass84
798 posts
Gave thanks: 41
Thanked 34 times
Question About Cron

Hello,

I am attempting to setup a cronjob that will generate an RSS feed from my database every 6 hours. I already made all the PHP code to do this, but I am not familiar with cronjobs and how to execute them.

Google search revealed this string to enter in the command line:

php /home/user/public_html/path/to/file.php

My question is, can I append variables to the end of the cron command?

For example:

php /home/user/public_html/path/to/file.php?action=generate&feed=1

The bolded portion is what I am unsure about. If someone with experience could please help me, I would greatly appreciate it!
__________________
fury™ - not helping the situation since 1987
robmonroe.net | | bullsux.com
fury is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old January 20th, 2008, 10:05 PM   #2 (permalink)
He shoots.. He scores!
Super #1
 
puckchaser's Avatar
 
Joined in Feb 2007
Lives in A room with no windows.
Hosted on SH110
1,442 posts
Gave thanks: 46
Thanked 140 times
I dont know for sure, but this is what I would do.

Take the command you want to cron, and run it from the shell. See if it works. If it works, put it in crontab. If not, back to Google.. :-P

edit... I dont think your code will work...

Check out this PHP.net reference on command line.

http://us3.php.net/features.commandline
__________________
SH110

Last edited by puckchaser; January 20th, 2008 at 10:08 PM.
puckchaser 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

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