04-11-2012
Hello,
Try exporting $PATH and see if it works!
add export $PATH if your script.
Regards
Ravi
10 More Discussions You Might Find Interesting
1. Solaris
I am trying to run a sript on cron to SFTP data to a company. Private and public keys are set up.
When I run this manully it works fine, however it was failing when run on cron. I have narrowed down the problem - it fails at the code that says if the error code is 0 then continue
. . . I... (2 Replies)
Discussion started by: Heidi.Ebbs
2 Replies
2. Shell Programming and Scripting
Hi all
I have this inside a shell script (bash):
cd DIRECTORY
find . -maxdepth 1 | sed 's#./##' | /usr/bin/xargs -I '{}' chown -Rv '{}' /DIRECTORY/'{}'
All the directories in this location are named after usernames, so it simply sets the owner to that of the username of the folder.
It... (5 Replies)
Discussion started by: fakesy
5 Replies
3. Shell Programming and Scripting
Hello all,
I'm new here and have a question if you don't mind helping me. I have a script that will work if I kick if off manually but not from Cron. My cron entry is this:
05,20,35,50 * * * * /scripts/status.sh > /dev/null 2>&1
The first script (works fine) is this:
#!/bin/sh
#
#... (14 Replies)
Discussion started by: hs3082
14 Replies
4. Shell Programming and Scripting
Hello Every one,
I have a shell script which is running fine manually, but its giving me hard time when running tru cron job. :wall:.
Am using #!/usr/bin/ksh
>echo $SHELL
/usr/bin/ksh
Cron Job is as below, it execues but dosent do what i want it to do.
47 15 * * *... (1 Reply)
Discussion started by: naren.chowdhary
1 Replies
5. Shell Programming and Scripting
Hello Guys,
I have scratched my head alot on this but couldn't find clue what's wrong. Can you please help me with this? My problem is as following.
1) When I manually execute following script it runs successfully with below output.
bash-3.00# more smssend
#!/bin/bash
echo -e "<Request... (16 Replies)
Discussion started by: umarsatti
16 Replies
6. Shell Programming and Scripting
Hello Team,
As a part of my job we have made a script to automate a service to restart frequently.
Script having two functions when executing it's should find the existing service and kill it, then start the same service . Verified the script it's working fine when executing... (18 Replies)
Discussion started by: gowthamakanthan
18 Replies
7. Shell Programming and Scripting
Hello Gurus,
I have written small script which will start the given service if its stop .Its running fine when manually executed but its unable to run from crontab.
#!/bin/bash
SERVICENAME=rsyslog
service $SERVICENAME status > /dev/null
SYSLOGSTATUS=`echo $?`
COUNT=0
THRESHOLD=3
if ... (4 Replies)
Discussion started by: kapil514
4 Replies
8. UNIX for Dummies Questions & Answers
Hi Guys,
I am executing the script called Delet.sh manually it is successfully completing the task but it is failing to run vi cron tab, I tried to pass PATH & .profile before execution but no luck, Any suggestions?
Script below
#!/usr/bin/ksh
#set -x
# Purpose : Delete folders file from... (9 Replies)
Discussion started by: Anilsa77
9 Replies
9. Shell Programming and Scripting
Hi,
I "borrowed" a script I found online, to start a SAP router application on a Solaris 11 (SPARC) server.
The script runs fine when calling it manually, but when I schedule it to run from cron, it doesn't. I don't see any warning or failure messages anywhere, just nothing happens.
... (11 Replies)
Discussion started by: bredman
11 Replies
10. Shell Programming and Scripting
I have a script (/home/admin/run_bkup.sh) that I can run manually to kick off an executable job. I want to run it in crontab, but it doesn't work.
Here's the script:
shell=/bin/bash
today=$(date +"%m-%d-%y")
/opt/CPsuite-R77/fw1/bin/upgrade_tools/upgrade_export mgt-svr-bkup-$today << EOF
y... (18 Replies)
Discussion started by: df08388
18 Replies