Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Re-directing issue.

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-25-2013   -   Original Discussion by Nagaraja Akkiva
Nagaraja Akkiva Nagaraja Akkiva is offline
Registered User
Join Date: Apr 2011
Last Activity: 23 February 2017, 2:39 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
Old Unix and Linux 03-25-2013   -   Original Discussion by Nagaraja Akkiva
hanson44 hanson44 is offline
Registered User
Join Date: Mar 2013
Last Activity: 12 May 2013, 11:33 PM EDT
Posts: 858
Thanks: 18
Thanked 183 Times in 178 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:

> $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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Re-directing output kkalyan UNIX Desktop 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 06:58 AM.