If you get 'file not found' in cron and you don't get that error from the command line you have an environment problem. Period - there is no other reasonable explanation, assuming you don't have relative paths in your script That is what you need to explore first.
Do this with either set or env at the command line:
add this line to your cron job
When you have both files, try a diff on them. You may have to source both /etc/profile and your .bashrc to get the code to run in cron.
Hi,
When I give the following
$ ps -ef | grep `echo $var1` | grep -v "grep `echo $var1`" | awk '{print $3}' | grep -v `echo $var1
80892
But when I give the following (made as command substitution) , I get error
$var2=`ps -ef | grep `echo $var1` |... (2 Replies)
Hi all,
i executed a script.
cat <filename> | grep <pattern> | awk '{print $1}' | read a
i get the answer when i execute it in the shell env (no problem with that)
as
./<name>.ksh
when i tried the same in cron (as an entry in cron)
value is not being read in the variable a through... (1 Reply)
Part of my script throws an error.
Your "cron" job on mitv-t-voms02
/usr/tlrscr/runhc.sh
produced the following output:
/usr/tlrscr/runhc.sh: top: not found
/usr/tlrscr/runhc.sh: top: not found
/usr/tlrscr/runhc.sh: top: not found
syntax error on line 1, teletype
That part of... (2 Replies)
Hi,
I was using mpack to send mails using cronjob with attachments. It was working perfect. But recently it's behaving strangely. Its sending the mails without any error message but the mail is not getting delivered.
The code I was using:
/usr/local/bin/mpack -s "$SUBJECT" -d $MSGBODY... (0 Replies)
Hi all,
I was using mpack for sending mails with pdf as attachment. It was working well. but some days back my server was shut down forcefully due to power failure and I found now the mails are moving to the queue always.
I checked in /var/spool/mail/mqueue. Is the forece shutdown has to do... (0 Replies)
Hi,
I have script which is properly running but when i schedule it in cron it throws an error like :
Your "cron" job on retrprdapp1
/usr/bin/sh /retr/cron/ftp.sh 2>&1
produced the following output:
/retr/cron/ftp.sh: syntax error at line 17: `(' unexpected
line17 is
# Get list of... (10 Replies)
Hello,
I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error:
stty: tcgetattr: a specified file does not support the... (3 Replies)
hi everyone I'm newbie in this forum hope I can get some help here :)
I have a command in crontab that executed every 1 minute
sometime this command need more than 1 minute to finish
the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Hi All ,
Please read the below data carefully.
I have run the below script on unix server its running succesfully. but when i run the same script using cronsetyp it giving me the error :
command not found at (line num):cruiseStartup.sh
below is code
netstat -anp |grep 8181... (5 Replies)
I am receiving an error when i type the command dmesg
sudo: sysmon : pam_authenticate: Conversation failure ; TTY=unknown ; PWD=/export/home/sysmon ; USER=root ; COMMAND=/opt/scripts/cronmgmt/synch_crontab.ksh
Whats it about and how can I remove it ? (1 Reply)