Crontab Check


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Crontab Check
# 1  
Old 04-30-2007
Crontab Check

Hi I have put a script which runs in my Cron in Unix.

I would like to know whether that script has executed successfully or not. Can anyone tell me how I can do that?

Thanks,
iAm4Free
# 2  
Old 04-30-2007
The following crontab entry would run the /home/me/bin/test.sh script on the hour and send any output and errors to a file called /home/me/log/test.log.

0 * * * * /home/me/bin/test.sh 2&1> /home/me/log/test.log

If you wanted it to append to the log instead of over write the log each time it ran you could use "2&1>>".
# 3  
Old 04-30-2007
Code:
<Server /var/cron>ls -lr
-rw-r--r--   1 root     root      146365 May  1 06:15 log


You can check in log file ( /var/cron/log)
# 4  
Old 05-01-2007
Hi Srikanth,
I don't have access to use cron but still i could see the log file mentioned by you with the current date & time stamp.

Shahnaz.
# 5  
Old 05-02-2007
Thanks for the help everyone...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl code to check date and check files in particular dir

Hi Experts, I am checking how to get day in Perl. If it is “Monday” I need to process…below is the pseudo code. Can you please prove the code for below condition. if (today=="Monday" ) { while (current_time LESS THAN 9:01 AM) ... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

2. Shell Programming and Scripting

check in and check out comments

Hi Do you know how can I get all check in and check out comments for a period of time with Surround SCM CLI ---------- Post updated at 02:00 AM ---------- Previous update was at 01:56 AM ---------- Do you have NAnt tasks that allow us to access Evolution from an NAnt build script? (0 Replies)
Discussion started by: saku
0 Replies

3. UNIX for Advanced & Expert Users

Check EOF char in Unix. OR To check file has been received completely from a remote system

Advance Thanks. (1) I would like to know any unix/Linux command to check EOF char in a file. (2) Or Any way I can check a file has been reached completely at machine B from machine A. Note that machine A ftp/scp the file to machine B at unknown time. (5 Replies)
Discussion started by: alexalex1
5 Replies

4. Shell Programming and Scripting

script to check if another script is running and if so, then sleep for sometime and check again

Hi, I am a unix newbie. I need to write a script to check wheteher another script is still running. If it is, then sleep for 30m and then check again if the script is running. If the script has stopped running then, I need to come out of the loop. I am using RHEL 5.2 (2 Replies)
Discussion started by: mathews
2 Replies

5. Shell Programming and Scripting

How to check crontab edited date and time?

How to check when was the last time the crontab was updated and also what was the modification done ? (2 Replies)
Discussion started by: mail2sant
2 Replies

6. Shell Programming and Scripting

Need help on crontab ..........!

Hi All, I have one script. It should be scheduled in the crontab to run from 4th day to last day of every month. I mean it should not run only on 1st, 2nd and 3rd of every month. how can i schedule in the crontab? Does the following works fine? 0 10 4-31 * * myscript.sh can anybody... (3 Replies)
Discussion started by: vinayakatj56
3 Replies

7. UNIX for Dummies Questions & Answers

crontab

Hi All, Can any one please help in setting up crontab where the crontab entries are in a file say "crontabentries" How to delete the crontab entries and how to register a file to crontab. thanks Satish (1 Reply)
Discussion started by: thaduka
1 Replies

8. UNIX for Dummies Questions & Answers

Script to check for a file, check for 2hrs. then quit

I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit. Logically, I'm looking for the best way to approach this Thanks for any assistance in advance. Note: I'm using a C shell and... (2 Replies)
Discussion started by: mmarsh
2 Replies

9. UNIX for Dummies Questions & Answers

Check my crontab for possible errors.

I'm posting the line I just added to my crontab because it's my first and I want to be sure it's doing what I'm intending it to do. 59 23 0 * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh Supposed to do: Run script at 11:59pm every night, except weekends. Question: If I wish... (4 Replies)
Discussion started by: yongho
4 Replies

10. UNIX for Dummies Questions & Answers

crontab -l

For some reason, I get the following error message when I do a crontab -l: bt299m02!tier2 crontab -l crontab: Cannot run 'crontab' except under your login UID I verify that I am logged in as root with the id command: bt299m02!tier2 id uid=0(root) gid=1(other) A quick snapshot of my... (5 Replies)
Discussion started by: cdunavent
5 Replies
Login or Register to Ask a Question