Lynx via crontab


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Lynx via crontab
# 1  
Old 12-04-2002
Lynx via crontab

I've written a program using the bourne shell (I think)
Code:
#!/bin/bash

that goes through a database and for each line does
Code:
lynx "http://www.example.com/test.cgi?var=variable"

The whole point of this was to later move it into the crontab so that once a day it would run this program on a website. Now that I've gotten all the bugs out, I can open my terminal and run the program. It comes up with the website using lynx and tells me I'm successful. However, when I moved it into the crontab it sent me an email saying Your terminal lacks the ability to clear the screen or position the cursor. I typed man lynx to see if there were any ways around this, and couldn't find any. It said something about -term, but I couldn't find enough info about it for it to make sense to me. Is there some way to make the program think my terminal does have those abilities, or to make it ignore that completely? Or maybe even make the program open up a terminal window and then run? I've searched this forum and other sites and my Unix in a Nutshell book, but can't find anything. Thanks a lot for your help and for having the patience to read this far!
# 2  
Old 12-05-2002
lynx is a curses program - it usually assumes that you're running it interactively.
I use lynx in a few script that poll some monitoring web pages to make sure they themselves are up and properly configured. I use a combination of -dump and -source, and redirect either to a file. If you don't care what the page looks like, you could just do:
Code:
lynx -dump "http://www.example.com/test.cgi?var=variable" >/dev/null 2>&1

Otherwise, redirect it to a file for perusal later.
# 3  
Old 12-05-2002
I was soooo happy for about two minutes! I added the -dump to my line of code and when I ran the program manually, it put the successful text in my specified file. But, when I put my program in the crontab, it put the dreaded Your terminal lacks the ability to clear the screen or position the cursor. phrase in my specified file. I can't believe how much of a pain this is being! Do you know of another program I could use other than lynx to gain my desired results? Thanks for your help so far LivinFree!
# 4  
Old 12-05-2002
I think I got it with
Code:
wget -q "http://www.example.com/test.cgi?var=variable"

Thanks for your help LivinFree!
# 5  
Old 12-06-2002
Ahh, there you go! wget is something I forgot all about.
Actually, mine is wrapped in a shell script - that may be the issue if you're calling it directly from crontab.

But no worries now, wget is here to save the day!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can't set parameter to lynx properly

My intention is to go through list of addresses and call google geocode api for each of them. I am using lynx for this, but somehow I can't supply the parameters to it in a proper way. To show that my parameters are OK I just hardcoded one address in my script and put it in my input file, and... (2 Replies)
Discussion started by: migurus
2 Replies

2. Shell Programming and Scripting

lynx

theres a form with these fields <form name="cpgform" id="cpgform" method="post" action="update.php"> <input type="text" name="user" size="30" class="textinput" /> <input type="password" name="pass" size="30" class="textinput" /> <input type="hidden" name="method" value="admin" />... (1 Reply)
Discussion started by: vanessafan99
1 Replies

3. UNIX for Dummies Questions & Answers

I'm a noob at Lynx...

So... I'm using lynx on a Mac... I didn't know that the whole dang thing is in Terminal? I rarely use terminal. I can't even figure out how to start the thing up. I type in lynx into it and press enter... And the cursor just goes down. Nothing happens like the FAQ websites describe. I feel so... (6 Replies)
Discussion started by: yennster
6 Replies

4. UNIX for Dummies Questions & Answers

lynx browser + SSL

I want to browse to java.sun.. to download Java JDK I built openSSL then tried to build lynx to use it by: ./configure --with-ssl It finds the ssl .h files but cant link, last 3 lines from .configure are: checking for openssl include directory... yes checking if we can link to ssl... (6 Replies)
Discussion started by: mikebgx
6 Replies

5. Cybersecurity

Is there any Javascript things for Lynx?

Just wondered if anyone knows of a Javascript thing for Lynx, would be happy to be able to enter even such pages... Please answer if you know something about it... I'm using Linux 2.2.19, Slackware and Lynx 2.8.3... Thanks for answering...=) (7 Replies)
Discussion started by: zeus
7 Replies

6. Shell Programming and Scripting

lynx

lynx Hi there , how to use this command ?? is it t to download files with any type(.zip,.exe,.xxx) ?? and i want example thx ... (1 Reply)
Discussion started by: XPS
1 Replies

7. UNIX Desktop Questions & Answers

Lynx / Links

Is there a particular style that works better than the default for lynx / links / other text-browsers? Since my most commonly-used home machines have of RAM, I try to avoid XWindows / Netscape as much as possible. I have found, however, that the default isn't very easy to navigate in 24x80... (1 Reply)
Discussion started by: LivinFree
1 Replies

8. UNIX for Dummies Questions & Answers

lynx startup

how to add an GUI application in a lynx 9.0 server start up. replies appreciated. raguram R (4 Replies)
Discussion started by: raguramtgr
4 Replies

9. UNIX for Dummies Questions & Answers

Downloading with lynx

Hi there! I one saw a command that allowed to download a file using lynx from an HTTP server without opening lynx itself. Looked something like this: $ lynx -xyz http://localhost/foo.bar ~/foo.bar I looked into lynx manpages and help but didn't find anything. Thank you in advance (2 Replies)
Discussion started by: D-Lexy
2 Replies

10. UNIX for Dummies Questions & Answers

Surfing the web with Lynx

Linux detected my modem(finally!) and I then proceeded it to configure it with Minicom according to the instructions here. I got it configured, and can dial up to my ISP, but now I am trying to figure out how to get Lynx to use the connection. Any ideas? (3 Replies)
Discussion started by: Furtoes00
3 Replies
Login or Register to Ask a Question