If the script shown is executed by cron, be sure to use full path to applications inside the script..
Eg: /usr/bin/sudo, /usr/bin/sed, just like you had done for psql using the $dir_nnm_psg..
For egrep i'd alias it like:
Hth
EDIT:
Also, if you need to enter the password for sudo, it wont work at all, as there is no "input box" or 'terminal' shown to the user, never (afaik).
Further, sudo executes the command as root, so why not execute the script as root directly in the first place?
Hi
I have written a shell script(in Solaris) in which following logic is there.....
i=1
while read control
do
key=`echo $control | awk -F$DELIMITOR '{ print $1 }'`
echo "Key Values" ${key}
i=`/usr/bin/expr $i + 1`
done < $CONFPATH/$CONFFILE
when i execute it at prompt it... (4 Replies)
Hi,
I have the below job scheduled in crontab. Can you please tell me at what interval this job is scheduled? Where is the name of the job defined here? I will definitely go through the UNIX documentation a little later, for the time being, please provide me few details on this. Thank you.
... (0 Replies)
Hi
I have created a script. Which i have configured in cron to make it run in every 2 min. But script is not running. If I checl the cron log at /var/cron/log .it shows its running in every 2 min. Below is the command which i configured in crontab.
But I am not able to find the way so that... (9 Replies)
This is the crontab it is supossed to be running everyday but it didnt
5 0 * * * /export/app/CO/opge/scr/Informe_parametros_colombia.ksh >/dev/null 2>&1
Inside the above script connects to a database and extract data to a flat file, manually i run the script at about 2 a.m. and Works OK,... (6 Replies)
Hi,
I have written one script which is connecting to the the database and generating one CSV, it is running fine when i ran it manually though it is throwing any warning but CSV is generating and working fine but same script when i have configured in crontab not working and giving error, kindly... (6 Replies)
Hi,
I have written one script which is connecting to the the database and generating one CSV, it is running fine when i ran it manually though it is throwing any warning but CSV is generating and working fine but same script when i have configured in crontab not working and giving error, kindly... (1 Reply)
i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Hi Forum,
Good Day!
I have created an empty html file wtih permissoin 777
created shell script(with permission 777) , code is below.
#=======================start==============
. /data09/oracle/apps_st/appl/D_oraapp095.env
rm -rf /home/mnp/Test_log.txt
echo... (1 Reply)
i have written one script which is working fine when i run it manually but giving error when i schedule it in crontab.
cat SUMMARY.sh
#!/bin/bash
DT1=`date +%Y%m%d`
echo "Off PP TT" >>summary_$DT1.txt
cat ues1.txt_$DT1 >>summary_$DT1.txt
cat ues2.txt_$DT1... (2 Replies)
Hi,
We have created a script that's checks the latency of IIDR subscription by fetching details from a config file (that contains subscription details) and running the CHCCLP command. The out put is then concatenated in a csv file. Once all subscription details are saved the script send a mail... (7 Replies)