|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
I am running Apache on FreeBSD. I have a CGI script that works properly when run from a browser but fails when run from Cron.
It is retrieving information from web pages so I guess that when run from cron it needs to act like a browser. Does anyone know how I can get this done. Thanks Ron |
|
#2
|
|||
|
|||
|
Use cron to run Lynx or wget, calling the script using web protocol.
|
|
#3
|
|||
|
|||
|
>>but fails when run from Cron
You mean from command line? If not, why didn't you test it before running it from cron? >>so I guess that when run from cron it needs to act like a browser Not necessary. Anyway you need to show us your code. |
|
#4
|
|||
|
|||
|
rycamor - What is calling the script using web protocol?
Freebsd - Yes from the command line. I cant post the code but would be gald to email you a copy. Contact me at rdowell@ky-net.com |
|
#5
|
|||
|
|||
|
No thanks.
|
|
#6
|
|||
|
|||
|
>>rycamor - What is calling the script using web protocol?
Using wget, Lynx or some command-line web tool, and calling the script with http://thehostname/thescript.cgi But freebsd is right, even though the script is retrieving web page data, there is no reason for your script not to work from cron or the command line, unless it is set up to require http POST or GET variables, or HTTP_REFERER or some other such http variable. What language is the script written in? What error message do you get? |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > CGI Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|