![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cron job starts new cron proccess | ron76 | SUN Solaris | 3 | 05-12-2008 01:07 AM |
| AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log | Keith Johnson | AIX | 0 | 01-09-2008 08:32 PM |
| sth wrong of gcc | zither | AIX | 2 | 01-02-2008 01:57 AM |
| can someone tell me what im doing wrong here | iago | UNIX for Dummies Questions & Answers | 2 | 09-10-2007 09:20 AM |
| am i wrong? | termiEEE | UNIX for Dummies Questions & Answers | 4 | 03-07-2002 07:26 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
what is wrong with cron?
Hey, I have been fighting with this SIMPLE script for a while, and almost going to crazy!!
what I am doing is just get the DNS name for an IP, then echo the result, under bash shell, I can do this using command line, without any problem, $ a=`/usr/sbin/dig +short -x 216.239.37.104` $ echo $a va-in-f104.google.com. Ok, so I wrote this in a script, ran it, no problem, BUT , as long as I use cron to run this simple script, it give me nothing! $ more /tmp/test.sh #!/bin/bash a=`/usr/sbin/dig +short -x 216.239.37.104` echo "just confirm crontab execute this script" > /tmp/result echo $a >> /tmp/result $ more /tmp/result just confirm crontab execute this script $ what is the problem? |
|
||||
|
Hi,
I did encounter a similar problem previously. (ie, i can run the script manually, but it does not run in cron) Perhaps you can try: 1. chmod the script, say try to allow all to read,write,exec ( i know its dangerous, but if it works, you can narrow it down to permission, maybe can try to chmod to 750, or something) 2.Set your environment. ( because when you log in to run manually, somehow the system knows that its you, but when you do it in cron, the system does not. I am not sure of the exact details, though) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|