Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-22-2005, 08:55 AM   #1
Registered: Jan 2005
Location: Raleigh, NC
Distribution: Debian Etch, Slackware 10.2, Ubuntu 6.10, OpenWRT
Posts: 66

Rep: Reputation: 15
crond shell execution problems

I have a very frustrating problem involving a crond job. No matter how I issue it (in the crontab file, cron.hourly, ,user crontab, etc) the job executes, writes to my simple log file, but does not do so as it would running from my bash shell or root's bash shell. The command that I am executing is:
/usr/bin/lynx -cmd_script=/home/brphelps/ip_stuff/find_ip.txt
This script simply executes lynx with a command script to find my public ip address. The returned string is searched for an ip address, and works great if not run from crond.

I know this is probably not the best way to find a public IP address, but I use a similar lynx command to update the IP address when it is different. Why does it execute differently (incorrectly) under crond's daemon? I am suspicious that it has to with an environment variable but I have not been able to find which one. Any ideas? This will help me to design future crond jobs. Here is my cronjob file (I use this command to update: # crontab cronjob):

* * * * * /bin/bash /home/brphelps/ip_stuff/ >> /home/brphelps/ip_stuff/logs.txt

Last edited by lm317t; 02-22-2005 at 09:00 AM.
Old 02-22-2005, 10:46 AM   #2
Registered: Jan 2005
Location: Raleigh, NC
Distribution: Debian Etch, Slackware 10.2, Ubuntu 6.10, OpenWRT
Posts: 66

Original Poster
Rep: Reputation: 15
It looks like the window size (in rows) is different and I made the lynx command script more robust using searches within the page before submitting. This works flawlessly at least for now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SU/program execution permission problems darin3200 Linux - Software 8 08-20-2005 11:03 PM
Apache .cgi execution problems KeithKessler Linux - Software 7 12-01-2004 12:19 PM
Speeding up Shell Script execution?? funkymunky Programming 8 07-16-2004 09:39 PM
Crond jimval7 Linux - General 2 03-06-2002 12:28 PM
crond and xauth problems parapente Linux From Scratch 4 03-05-2002 05:21 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration