
|
View Full Version : Does crontab could do this?
sodapopinski 02-17-2001, 05:57 AM Ok,
since I'm using WebAdvert 3.01 and I must delete the log files and rebuild the database manually at least twice a day to reduce CPU usage.
I'd like to know if the following rebuild database command can be modified to crontab command.
<FORM METHOD=POST ACTION="http://blahblah.ext/blah.cgi">
<INPUT TYPE=HIDDEN NAME=password VALUE=blahblah>
<INPUT TYPE=SUBMIT NAME=rebuild VALUE="Rebuild Database">
</CENTER></FORM>
Thank you.
kunal 02-17-2001, 06:43 AM I dun think its possible. I dun think you can parse HTML in a Contrab script.
SickofAds 02-17-2001, 01:59 PM I don't think crontabs can do HTML either. But here's a thought. If you run a script that uses something like lynx you might be able to do that. You can go to a page that requires a username and password by putting it into the URL itself (I learned that from somebody, in fact). Really, I'm reaching here, so somebody chime in and tell me if this is in the realm of possibility.
So in the text file you have something like
lynx http://user:pass@www.blahblah.com
That would probably get the page open, but I have no idea how you would be able to do the rebuild. The log file removal could just be another line in the text file of commands, I guess.
rm file.log (or I guess the whole path to the file, right, because the server wouldn't know where to look in your home directory?)
I'm not sure how you would get out lynx either once you opened it using something like that. Food for thought.
guest 02-17-2001, 04:29 PM Although it's very possibly to execute a Lynx session, it's not needed and overkill. it's simple enough to just write a small script that runs this CGI script in question, if anything needs to be passed to it. But, it seems it'd be far easier, to simply have a cron job just execute that script and if it needs to pass any arguments to it, to simply do that. No reason to use Lynx or HTML to execute any CGI script. If there's something more detailed about this, post it here and I'll offer my suggestion, but this is certainly possibly to do and not even likely to be difficult. :-)
Website Rob 02-18-2001, 05:19 AM I would like to ask if this problem (of deleting the log file twice a day) has been going on for a long time? It sounds like a problem with the script itself and I'm curious as to how long it's been in use.
I have the program myself and just haven't gotten around to installing/testing it. If it cause these type of problems though, it would seem better to pass on it.
sodapopinski 02-18-2001, 05:30 AM Originally posted by Website Rob
I would like to ask if this problem (of deleting the log file twice a day) has been going on for a long time? It sounds like a problem with the script itself and I'm curious as to how long it's been in use.
I have the program myself and just haven't gotten around to installing/testing it. If it cause these type of problems though, it would seem better to pass on it.
Yes, it has been going on for a long time. Actually since I upgraded webadvert script from 2.15 to 3.01 on December 2000
Darryl (the author of WebAdvert) said that ver 3.xx using DB_File module, and I should ask my server admin to install it, otherwise, webadvert won't work efectifically.
But last week, the hostmaster of my web host installed this DB_File module for me and there's no progress yet :(
The log file still become bigger and bigger every day.
Any idea to fix this?
Website Rob 02-18-2001, 07:01 AM When you used the 2.15 version, did you also have this -- or any other type -- problem? I had heard from others the script used a lot of CPU which is one of the reasons why I was not in a hurry to try it out.
I would suggest trying out Adcycle ( http://www.adcycle.com/ ) as it is a Banner Management program I've heard good things about. Also which I have, but haven't gotten around to installing/testing either! ;)
AdCycle comes highly recommended and there is a Free version and Pay-for, both updated in the last 2 months. Runs with mySQL so that's an advantage right there, for the program. Not sure how that would sit with your Hosting setup. This is the one that I'm really looking forward to trying out.
The Banner program I have now works with flat-files and it ain't broke yet, so I have a tendancey to focus on "other" stuff. Also, I do not have 3rd party Banners, just my own. So the bigger, better programs, just don't have that much appeal to me at the moment.
If I remember correctly sodapopinski, you do have 3rd party Banners, so AdCycle could be right up your alley. Offers pretty much the same functions/features that WebAdvers does, but apparently without the high overhead.
sodapopinski 02-19-2001, 12:52 AM I upgrade the script from ver 3.02 to ver 3.04. (thanks to Dan O for his advice)
And now the script work just fine.
Adcycle is a great script too, but I run webadvert for banner exchange purpose.
Anyway, thank you very much for your help.
Website Rob 02-19-2001, 01:29 AM Your welcome. Glad it worked out for you. Didn't know 3.04 was available actually.
Better the Devil we know than the one we don't. ;)
|