The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Conditionally joining lines in vi ifermon UNIX for Dummies Questions & Answers 0 06-04-2008 10:43 AM
sed csv remove conditionally Jae Shell Programming and Scripting 6 08-03-2007 04:29 PM
How to update the contents in a file conditionally? rajus19 Shell Programming and Scripting 5 10-14-2005 04:20 AM
Email through Script rkumar28 Shell Programming and Scripting 2 03-21-2005 09:55 PM
email extract script gxiong High Level Programming 1 03-21-2005 07:49 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-01-2007
dfb500 dfb500 is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 14
Email from script conditionally

I have a script that is run from the Cron 3 times an hour, here is the cron line:

02,22,42 7-18 * * 1-5 /hci/TEST/bin/myscript.ksh TEST 1>/hci/TEST/logs/myscript.info 2>/hci/TEST/logs/myscript

I am curious as to whether the time parameters from cron, ( 02, 22, 42 etc) can be accessed from the script? The script ultimately calls an Expect script to login to a sever and if I expereince a timeout I want to send an email but only once an hour. I was thinking I could valuate the parameter of 02 and then send email only for that run. Obviously I could just check against current time but was concerned that I might be off the minute by the time the SFTP script fails. If this is an easier way to do this I am open but either way I am curious as to whether the cron line can be accessed in the script.

Thx

David
 

Bookmarks

Tags
sftp script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




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


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0