![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
crontabs executing PHP scripts...
5 * * * * wget --spider -q http://url_to_file.php
10 * * * * wget --spider -q http://url_to_file.php * 1 * * * wget --spider -q http://url_to_file.php Does this look about right if I'm running command line PHP?
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
First line will run wget on the 5th minute of every hour. Second like will run on the 10th minute of every hour and the thrid will run every hour at the begining of the hour. Hopefully this helps you out ![]() PS: You may or may not need to put the full path to wget. You should be able to find the absolute path by running "which wget" without the quotes |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Old school
Industry Role:
Join Date: Nov 2002
Location: Kettering, OH
Posts: 4,327
|
Quote:
![]()
__________________
Need a programmer? (Desktop/Web Applications) --- Skype: napoleande |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Quote:
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
![]() ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Quote:
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Quote:
Thanks ![]()
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
Running PHP as a CGI - The webserver forks the process and executes the script (somewhat simular to the command line) Running PHP as a module - APACHE internally processes the script instead of forking a process and using the php binary file to execute the script. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
Are the scripts located on the same server as the wget crontab? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Quote:
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
![]() Find the path to the PHP binary "which php" without quotes. Then change the lines to this 5 * * * * /usr/local/bin/php /path/to/php/script.php But only if you only want to run that script... if you still want to use wget's spidering abilities then stick to the way you've done it |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Posts: 10,592
|
Quote:
__________________
![]() ![]() ![]() "I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
Hit me up on ICQ at 5956902 if you need anymore help ![]() (assuming that by module you mean executable binary file which is the php parser/interrupter) If php is installed as an APACHE module and not as a binary file then you wont be able to do it and will have to use wget/apache OR you could just install PHP as a binary file ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |