LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   crond shell execution problems (https://www.linuxquestions.org/questions/linux-general-1/crond-shell-execution-problems-293367/)

lm317t 02-22-2005 07:55 AM

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!

lm317t 02-22-2005 09:46 AM

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.


All times are GMT -5. The time now is 03:26 AM.