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