Check my crontab for possible errors.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Check my crontab for possible errors.
# 1  
Old 06-20-2005
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.
Code:
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 to direct error output, will the following work:
Code:
59 23 0 * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh > 2>/export/<many_directories_later...>/scripts/error.log

# 2  
Old 06-20-2005
Should be

Code:
59 23 * * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh > 2>/export/<many_directories_later...>/scripts/error.log

# 3  
Old 06-20-2005
hmm..

oh.. i see.
That would've been bad.
# 4  
Old 06-20-2005
Oups,

you should remove a > before 2>/export/<many_directories_later...>/scripts/error.log ... so it will be

Code:
59 23 * * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh 2>/export/<many_directories_later...>/scripts/error.log

or do

Code:
59 23 * * 1-5 /export/<many_directories_later...>/scripts/get_clientkpi.sh >/dev/null 2>/export/<many_directories_later...>/scripts/error.log

# 5  
Old 06-20-2005
ahh... great

great, thanks.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need in for a script that should check for errors in multiple log file (approx 2500) and should mail

hello everyone, I am new to linux and got this deliverable to write a script that should check for error in multiple log file (count is approx 2500 log files on single server) and once error is found, it should mail that error My logic says: we can put all log files path/location in one... (2 Replies)
Discussion started by: Pratik_CTS
2 Replies

2. Shell Programming and Scripting

Check for “errors” or “ORA-”

I want to check for "errors" or "ORA-" in Y.if there is an error then exit Y=`sqlplus -s user/passwd<< EOF exec test_Proc; exit; EOF` if ; then exit 1 fi but this doesnt work (6 Replies)
Discussion started by: haadiya
6 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

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

5. Shell Programming and Scripting

Traverse a flatfile and check for errors

Hi, I need to check a flatfile for various parameters like length of the record, format of record, any tab character present in the record etc., for checking presence of tab character, i'm trying to use the following code and i'm not sure if the same is right. Pls Help. nawk '{print... (1 Reply)
Discussion started by: aravindc
1 Replies

6. UNIX for Dummies Questions & Answers

Major OS errors/Bash errors help!!!!

Hi all, dummy here.... I have major errors on entering the shell. On login I get: -bash: dircolors: command not found -bash: tr: command not found -bash: fgrep: command not found -bash: grep: command not found -bash: grep: command not found -bash: id: command not found -bash: [: =: unary... (12 Replies)
Discussion started by: wcmmlynn
12 Replies

7. Shell Programming and Scripting

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 (4 Replies)
Discussion started by: iAm4Free
4 Replies

8. What is on Your Mind?

Check this out. Find out the errors as much as possible. thanks

Sorry guys, busy working on a new project these days so I am not able to keep this topic update frequently. Few days earlier I talked to some of my friends in China and understand more about the current situation of China's IT industry. From what they told me and considering my experience and... (6 Replies)
Discussion started by: CULM
6 Replies

9. AIX

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (2 Replies)
Discussion started by: mcastill66
2 Replies

10. UNIX for Advanced & Expert Users

Adapter Errors and Link Errors

$ errpt | more IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION 3074FEB7 0802050205 T H fscsi1 ADAPTER ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR B8113DD1 0802050205 T H fcs1 LINK ERROR 3074FEB7 0802050205 T H fscsi0 ADAPTER ERROR B8113DD1 ... (0 Replies)
Discussion started by: mcastill66
0 Replies
Login or Register to Ask a Question