Re-directing issue. | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Re-directing issue.

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-25-2013
Nagaraja Akkiva Nagaraja Akkiva is offline
Registered User
 
Join Date: Apr 2011
Last Activity: 31 January 2014, 4:47 AM EST
Location: Bangalore
Posts: 35
Thanks: 16
Thanked 0 Times in 0 Posts
Re-directing issue.

Hi All,

Have scheduled a cron entry to run once a week.


0 0 * * 1 /export/home/nz/history_load/prod/LoadManager.sh >>/dev/null 2>&1


Not sure, why this job did not got triggered last week. Want to know the reason behind not getting triggered.

I was re-directing the output of the command to >>/dev/null 2>&1
instead of logfile. Please let me know is there a way to chek this?

Thanks and Regards
Nagaraja Akkivalli.
Sponsored Links
    #2  
Old 03-25-2013
hanson44 hanson44 is offline
Registered User
 
Join Date: Mar 2013
Last Activity: 12 May 2013, 11:33 PM EDT
Posts: 858
Thanks: 18
Thanked 180 Times in 177 Posts
Maybe the server was down when the cron job was supposed to run?

I would just say > /dev/null but it doesn't matter.

/var/log/syslog or similar logfile maybe with different name on different system should record what happens every time a cron job runs. Browse or grep that file.

You can crontab -e to make the job run sometime when you are around and you can monitor what happens.

You might as well direct the output to some log files so you'll never be in the dark:

Code:
> $HOME/mydir/cron-job-log.stdout 2> $HOME/mydir/cron-job-log.stderr

The Following User Says Thank You to hanson44 For This Useful Post:
Nagaraja Akkiva (03-27-2013)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Re-directing output kkalyan UNIX Desktop for Dummies Questions & Answers 1 12-05-2011 04:28 AM
directing output to multiple files cobroraj Shell Programming and Scripting 2 07-22-2009 01:01 PM
Error re-directing fermisoft UNIX for Advanced & Expert Users 3 09-13-2005 03:12 AM
directing output Cynergetix UNIX for Dummies Questions & Answers 1 03-21-2002 12:59 PM
Locating files and directing ouput klannon Filesystems, Disks and Memory 2 03-11-2002 12:57 AM



All times are GMT -4. The time now is 04:07 PM.