Log error from cron job into log file


 
Thread Tools Search this Thread
Operating Systems Solaris Log error from cron job into log file
# 15  
Old 03-19-2014
SmilieSmilie
You dont need the backslash if it holds nicely on one line...
This User Gave Thanks to vbe For This Post:
# 16  
Old 03-19-2014
Log error from cron entry into log file

@hicksd8
I understood exactly what he meant, that is why my last command, perhaps you did not see.

@vbe

So I should remove
Code:
\

# 17  
Old 03-19-2014
If its a one liner that holds on one line then yes...

I usually use backslahes because I limit to around 80 char the lengh of a line in my crontabs for ease of reading...
This User Gave Thanks to vbe For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

How to log http 404 error to a separate log file?

Apache Web Server: how to log http 404 error to a separate log file and i do not want to log in access.log please advice. (2 Replies)
Discussion started by: raghur77
2 Replies

2. UNIX for Dummies Questions & Answers

Error while running a script through cron job

Hi Team, When i am running the below query manually it is giving me the right output i.e. export PATH=/usr/sbin:/usr/bin:/sbin:/bin:$PATH ADMIN=abc@abc.com CPU_HIGH=`sar|awk '{print $9}'|sort -n|head -5|sed -n 5p` CPU_MAX=`echo "scale=3; 100-$CPU_HIGH" | bc` CPU_LOW=`sar|awk '{print... (13 Replies)
Discussion started by: Ekamjot
13 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

Capture all error message in Log file and send the Log file by email

Hi I have a requirement to write a script to capture all errors in a Logfile and send the file in email. If there is any error occurred the subject of email will be ERROR , If there are no error occurred the subject of email will be SUCCESS. So I created a Log file and put the Appropriate... (2 Replies)
Discussion started by: dgmm
2 Replies

5. Shell Programming and Scripting

Cron Log file

Hi Iam new to unix .please help me in writing a script.Suppose there are 100 scripts in a cron file which are scheduled to run at different times,different dates . I need to monitor all the scripts daily whether they ran or not if ran whether its sucessfully ran or not . if the script hasnt... (2 Replies)
Discussion started by: mskalyani
2 Replies

6. UNIX for Dummies Questions & Answers

Showing a daily backup job from a unique log file.

Hi guys, I´m a newbie in Linux, but I´m trying to solve some problems studying on my own, but I´ve had some problems with AWK. Look, I have one single backup log file per server and I want to make a daily delection from the last backup job to show in a intranet of my work. The log files are from... (0 Replies)
Discussion started by: metalfreakbr
0 Replies

7. Shell Programming and Scripting

cron job error

HI am having a script file which is ok if i run from the server manually like <root@hostname:/space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount > /space/canvas/home/lbs/current/internalcdrbackup/LES_CDR_Configuration/0/MSISDNcdrCount.txt the... (2 Replies)
Discussion started by: aemunathan
2 Replies

8. Shell Programming and Scripting

Error in cron job;

Hi All, please help me out with this problem. While running my mail_out_original.ksh in CRT window, it disconnects from the server saying not connected Here is my code : (please see the attachment) ____________________________________________________________ #!/bin/ksh ## Load... (1 Reply)
Discussion started by: shruthinagaraj
1 Replies

9. UNIX for Dummies Questions & Answers

Error in cron job;

Hi All, please help me out with this problem. While running my mail_out_original.ksh in CRT window, it disconnects from the server saying not connected Here is my code : (please see the attachment) ____________________________________________________________ #!/bin/ksh ## Load... (1 Reply)
Discussion started by: shruthinagaraj
1 Replies

10. Red Hat

LAuS error messages in /var/log/cron

I'm running RedHat Linux Enterprise Server ES Version 3 and I've stopped the audit service. Now I'm getting the following error messages in /var/log/cron May 17 07:01:01 pam crond: LAuS error - do_command.c:243 - laus_log: (19) laus_log: No such device May 17 08:01:01 pam crond: (root) CMD... (1 Reply)
Discussion started by: soliberus
1 Replies
Login or Register to Ask a Question