how to find whether a script ran or not


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to find whether a script ran or not
# 1  
Old 05-22-2011
Java how to find whether a script ran or not

Hi, I have written a script and placed in an application and the script can be executed manually only. But somehow one of the method in the script is being called and bringing the application down. But we are not able to find any instance of script running.

Is there a way to findout whether the script ran or not at a particular time or not.

Thanks
Satya
# 2  
Old 05-22-2011
I think, there is no way to check this... but u can do one thing....
add one line in starting of ur script like

print `date \n ` >> scriptlog

by this whenever ur script is run u got the time in "scriptlog" file

try this...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. UNIX for Dummies Questions & Answers

Test if script was ran w/ nohup

I want to test if script.sh is being run with nohup ... but $0 does not contain nohup part... purpose: script.sh should only be ran with nohup if user forgets nohup then it should echo "run with nohup" && exit....... (2 Replies)
Discussion started by: holyearth
2 Replies

3. Shell Programming and Scripting

Need bash script to ping the servers and rename the output file each time the script is ran

HI, I have a file serverlist in that all host names are placed. i have written a small script #./testping #! /bin/bash for i in `cat serverlist` do ping $i >> output.txt done so now it creates a file output.txt till here fine.. now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies

4. UNIX for Dummies Questions & Answers

find the no of processes that ran 2 hours before or earlier

Is there a way to find out the total no of processes that were running ? - 2 or 3 hours before - list those no of processes (3 Replies)
Discussion started by: jansat
3 Replies

5. UNIX for Dummies Questions & Answers

Find hangs when ran under superuser.

When I ran the following find command under a "regular" user is completes but it limited because of perms. find / -name "*.*" | xargs grep something > ok But when I try to run it under su, it hangs and never completes. Any suggestion? (4 Replies)
Discussion started by: shorty
4 Replies

6. Shell Programming and Scripting

absolute path for a script ran with relative path

I have a script in which i want to print absolute path of the same script irrespective of path from where i run script. I am using test.sh: echo "pwd : `pwd`" echo "script name: $0" echo "dirname: `dirname $0`" when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies

7. HP-UX

Aaarrggghhh HP warranty ran out

We have HP 9000 running UX. Does anybody know a reputable or even a strong maintenance firm that DOESN'T have a help desk the other side of the planet? We've been approached by Newcorp but thay seem rubbish. Please give me some recommendations. Sorry if this is posted in the wrong room but I... (3 Replies)
Discussion started by: Handsy
3 Replies

8. UNIX for Dummies Questions & Answers

Script ran by job scheduler fails from the 15th to the 20th of the month

Hi, I have a script that finds the application logs from the previous day and sends it to another server via ftp. The code is something like this: yest_date=`TZ=CST+24 date "+%b %d"` logdir=/app/logs logs=app*.log tmpdir=/tmp cd $logdir for i in `ls -1 $logs` do chkstr=`ls -1l $i | grep... (2 Replies)
Discussion started by: tatchel
2 Replies

9. Shell Programming and Scripting

Script to ran ant.xml file

Hi All, I want to login to Oracle Application Server and run ant.xml file. Can someone propose a script for that task? Thanks, Abraham123 (0 Replies)
Discussion started by: Abraham123
0 Replies

10. Shell Programming and Scripting

Reg: Shell script ran using informatica

Hi all, I am not sure whether this is the right place to ask this question...:) I am working in Informatica PowerCenter 8.1.1 tool and my server is on UNIX. I have got a shell script to copy files from one folder to another. When I run the script directly from UNIX prompt it is taking 60... (0 Replies)
Discussion started by: sam99
0 Replies
Login or Register to Ask a Question