![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|