10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I've got a Bash backup script I'm trying to run on a directory via a cron job nightly. If I ssh in and run the script manually it works flawlessly. If I set up the cron to run evertything is totally messed up I don't even know where to begin.
Basically the path structure is
... (6 Replies)
Discussion started by: wyclef
6 Replies
2. Shell Programming and Scripting
Hi,
My shell script not getting called through cron job.
The same works fine when executed manually.
I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins:
*/5 * * * * /home/myfolder/abc.sh... (17 Replies)
Discussion started by: Dejavu20
17 Replies
3. Shell Programming and Scripting
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am calling a series of shell scripts via CRON so everything is running as root. However, in my error log file I am seeing the following errors. Please can anyone offer any advise as to the possible causes and solution to prevent the errors from appearing.
The Error 1227 seems to... (2 Replies)
Discussion started by: daveu7
2 Replies
5. Shell Programming and Scripting
Hello,
I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me
1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
6. Shell Programming and Scripting
Hello,
I know little about shell scripting and creating a script, and worked fine in the command line. But not work in the cron. Below you could see the script
#!/bin/sh
LOGFILE=/home/transfield/mou/test.log
# Find yesterday Date and copy files
TODAY=$(date --date= +%F)
YESTERDAY=$(date... (4 Replies)
Discussion started by: malikp
4 Replies
7. Shell Programming and Scripting
guys
i have written a very simple script .it runs manually well.
but when i put it in cron,it doesn't give the desired output.
script looks like this:
#! /usr/bin/sh
#script for loading data in table using ctl file/Abhijeet K/08.07.2006
/svm_wl1/. .profile
cd... (5 Replies)
Discussion started by: abhijeetkul
5 Replies
8. Shell Programming and Scripting
Hi,
Is there a way to determine if a Script is called from a
CRON job or from a commandline
Gerry. (2 Replies)
Discussion started by: jerryMcguire
2 Replies
9. Shell Programming and Scripting
Hello expert,
What I want is to determine whether the script is called from CRON or it is executed interactively?
I tried the following but no luck:
#!/bin/ksh
cronID=`pgrep -x cron`
GPID=`ps -ef -o ppid,pid | grep " $PPID$" | awk '{print $1}'`
if ; then
echo I am being run... (15 Replies)
Discussion started by: wes_brooks
15 Replies
10. Shell Programming and Scripting
I'm puzzled by this one. I hope you can explain it to me.
I have a ksh shell script that gzips a file among other things. This works perfectly fine when the script is manually run through a shell. However, when the same script is run through cron, it does everything correctly, but it will... (2 Replies)
Discussion started by: hbau419
2 Replies