LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-22-2005, 07:55 AM   #1
lm317t
Member
 
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:
Code:
/usr/bin/lynx www.dyndns.org -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):

Code:
* * * * * /bin/bash /home/brphelps/ip_stuff/job.sh >> /home/brphelps/ip_stuff/logs.txt
thanks!

Last edited by lm317t; 02-22-2005 at 08:00 AM.
 
Old 02-22-2005, 09:46 AM   #2
lm317t
Member
 
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.
 
  


Reply


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 10:03 PM
Apache .cgi execution problems KeithKessler Linux - Software 7 12-01-2004 11:19 AM
Speeding up Shell Script execution?? funkymunky Programming 8 07-16-2004 08:39 PM
Crond jimval7 Linux - General 2 03-06-2002 11:28 AM
crond and xauth problems parapente Linux From Scratch 4 03-05-2002 04:21 PM


All times are GMT -5. The time now is 10:21 AM.

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