PDA

View Full Version : Spider with Windows Scheduler?


drjohnchadwick
01-13-2004, 02:24 PM
We have successfully installed PhpDig on a Windows 2003 server running Apache 2.048 and PHP 4.3.2. You can view it at http://www.stlib.state.nm.us/phpdig/search.php.

This is still a bit of a work in progress, but the big issue is that I need to crawl one of the sites between 10 p.m. and 6:30 p.m. I know this can be done easily in Unix with a chron job, but can the same or similar goal be done using Windows Scheduler?

Thanks,

John Chadwick
jchadwick@stlib.state.nm.us

Charter
01-13-2004, 06:35 PM
Hi. Perhaps something in this (http://www.phpdig.net/showthread.php?threadid=99) thread might help.

drjohnchadwick
01-14-2004, 08:28 AM
Thanks, I am trying this, but I am having some problems similar to what is described in another thread. I do the command lie which is:

C:\php> php.exe -f "Program Files\Apache Group\Apache2\htdocs\phpdig\admin\spider.php" http://www.state.nm.us

What I get are the following error messages. I have tried modifying the spider as per the instructions in another thread and no luck. If I can get the command line to work then I can create a .bat file to run and under Windows Scheduler.

Thanks,

John

<b>Warning</b>: main(): Failed opening './includes/config.php' for inclusion (i
nclude_path='.;c:\php4\pear') in <b>C:\Program Files\Apache Group\Apache2\htdocs
\phpdig\admin\spider2.php</b> on line <b>92</b><br />
<br />
<b>Warning</b>: main(./admin/robot_functions.php): failed to open stream: No su
ch file or directory in <b>C:\Program Files\Apache Group\Apache2\htdocs\phpdig\a
dmin\spider2.php</b> on line <b>93</b><br />
<br />
<b>Warning</b>: main(): Failed opening './admin/robot_functions.php' for inclus
ion (include_path='.;c:\php4\pear') in <b>C:\Program Files\Apache Group\Apache2\
htdocs\phpdig\admin\spider2.php</b> on line <b>93</b><br />
<br />
<b>Warning</b>: main(./admin/debug_functions.php): failed to open stream: No su
ch file or directory in <b>C:\Program Files\Apache Group\Apache2\htdocs\phpdig\a
dmin\spider2.php</b> on line <b>94</b><br />
<br />
<b>Warning</b>: main(): Failed opening './admin/debug_functions.php' for inclus
ion (include_path='.;c:\php4\pear') in <b>C:\Program Files\Apache Group\Apache2\
htdocs\phpdig\admin\spider2.php</b> on line <b>94</b><br />
<br />
<b>Fatal error</b>: Call to undefined function: phpdigprnmsg() in <b>C:\Progra
m Files\Apache Group\Apache2\htdocs\phpdig\admin\spider2.php</b> on line <b>109<
/b><br />

Charter
01-14-2004, 09:45 AM
Hi. It looks like a path issue. Try one of the following instead:

C:\php> php.exe -f "C:\Program Files\Apache Group\Apache2\htdocs\phpdig\admin\spider.php" http://www.state.nm.us

C:\php> php.exe -f "C:\progra~1\apache~1\Apache2\htdocs\phpdig\admin\spider.php" http://www.state.nm.us

C:\Program Files\Apache Group\Apache2\htdocs\phpdig\admin> C:\php\php.exe -f spider.php http://www.state.nm.us

drjohnchadwick
01-14-2004, 10:04 AM
Bingo! That was the problem. Thanks!!!

John

Charter
01-14-2004, 10:15 AM
Hi. Which one did you use?

drjohnchadwick
01-14-2004, 10:28 AM
I used the third one option:

C:\Program Files\Apache Group\Apache2\htdocs\phpdig\admin> C:\php\php.exe -f spider.php http://www.state.nm.us

John

Charter
01-14-2004, 10:37 AM
Okay, thanks. :)

drjohnchadwick
01-14-2004, 11:28 AM
I also found that with the solution, by leaving off the URL I am able to force phpdig to spider all the sites in my list.

Charter
01-14-2004, 11:53 AM
Hi. Yes, that is the default. ;)

Visit here (http://www.phpdig.net/navigation.php?action=doc#toc8) for more options and here (http://www.phpdig.net/showthread.php?postid=1724#post1724) for some extra explanation.