output file of the shell script running through crontab is deleting automatical daily.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting output file of the shell script running through crontab is deleting automatical daily.
# 1  
Old 10-13-2009
Question output file of the shell script running through crontab is deleting automatical daily.

Dear Friends,

I am working on IBM AIX. I have written one script and kept in the crontab as to run daily at 11:38 AM. and the output of the script to be appended to the file generated with the month name. but my file deleting daily and the new file is creating with the output of the shell script.

So can anybody help to fix it up.
My script:
Code:
dt=`TZ=IST+18:30 date +%B`
/tellin/smp/Operation/scripts/INDRREPORT>>/tellin/smp/Operation/indrsummary_$dt.unl

This script file which kept in the crontab is to run one script with the name INDRREPORT and to keep the output in some other folder.

My crontab syntax:
Code:
38 11 * * * /tellin/smp/Operation/scripts/indrreport >/dev/null 2>&1


Last edited by innamuri.ravi; 10-13-2009 at 03:35 AM.. Reason: code tags please...
# 2  
Old 10-13-2009
So if you run your script to generate the output manually twice in a row it just appends to the file with no problems? I don't think cron is your issue.
# 3  
Old 10-14-2009
Hi Friend,

Thanks for the reply. The output is appending to file normally on the same day. but as i observed the file is deleting on the same day and the new file is getting generated for the next day.

Please revert you could not understand my issue.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue in running shell script in crontab

I'm having a shell script which has to be run only once at the specified time. Shell script is like following, #!/bin/bash db2 connect to XXX > connection_status.txt This script is scheduled in crontab as following, 50 4 8 5 0 sh script.sh scheduled script is run at the specified time... (1 Reply)
Discussion started by: Rajkumar Gandhi
1 Replies

2. Shell Programming and Scripting

Part of the Shell script is not running via crontab, runs fine manually

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

3. Shell Programming and Scripting

Shell Script to grep Job File name and Log File name from crontab -l

Hello, I am new to shell scripting. I need to write a shell script where i can grep the name of file ie. .sh file and log file from crontab -l. #51 18 * * * /home/oracle/refresh/refresh_ug634.sh > /home/oracle/refresh/refresh_ug634.sh.log 2>&1 #40 17 * * * /home/oracle/refresh/refresh_ux634.sh... (1 Reply)
Discussion started by: guptra
1 Replies

4. Shell Programming and Scripting

Running a script in crontab which executes a jar file

Hi, I have a script (.sh file) which has been created through my login. This script executes a jar file. Java is installed through my login and the folder has been given full permission for access. When this script is added by root in crontab, it does not get executed. Could you please... (1 Reply)
Discussion started by: archana.n
1 Replies

5. Shell Programming and Scripting

Running a select script through UNIX and sending output to file

Hi, (Oracle, AIX) I have googled this and searched this forum, however I haven't had much luck with an answer and have tried several different things. Basically I have a SQL select statement which generates a whole load of UPDATE statements, I want to run the select statement via... (13 Replies)
Discussion started by: dbchud
13 Replies

6. Shell Programming and Scripting

Shell programming - running the exe file and printing the output.. ?

hai i have a directory lib in that lib directory i have 10 batch files. step i have to do is 1) EXECUTE ALL THE FILES by using the command dwarfdump <filename>| grep DW_AT_SUN_command_line and put the output in one text file.instead of executing the files for all the 10 files... (13 Replies)
Discussion started by: shenthil76
13 Replies

7. Shell Programming and Scripting

Shell script to generate daily crontab entries between to specific dates

Hi, I am currently writing a shell script to enter daily reoccurring jobs into the crontab. I want to be able to specify any two dates for which I want these daily jobs to run between. Below is an example of what I need to be written to crontab. # Give a start day of 21/10/2009 09:00... (2 Replies)
Discussion started by: JM_86
2 Replies

8. Shell Programming and Scripting

Shell Script for deleting the first line in a file

Hi, Could any one please post the shell script for deleting the first line in a file? (3 Replies)
Discussion started by: badrimohanty
3 Replies

9. Shell Programming and Scripting

problem running shell script (for oracle export) in crontab

Hello Gurus, I've been tasked with solving a problem at my new job and I'm stumped. We've got a script that dynamically builds an oracle export parameter files and then runs export from the shell. it runs fine when using the shell, but will NOT run (fails in one spot everytime) when entered... (1 Reply)
Discussion started by: jsheehan223
1 Replies

10. Shell Programming and Scripting

Facing issue in Solaris OS in crontab for running shell script

Hello i have a shell script. it is running fine when i manually run at command prompt using following command ./script_file but while running shell script from crontab, it is giving error in each line. (2 Replies)
Discussion started by: mabrar
2 Replies
Login or Register to Ask a Question