| Private Hosting Questions about VPS, dedicated servers and colocation. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Surpass Fan
Excelling Contributor
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! |
|
|
|
|
|
#2 (permalink) |
|
He shoots.. He scores!
Super #1
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. |
|
|
|