There ia a script which loads some data within a box..... (what type of data is not important) ...... this script may complete in one hour, two hour or may be one day.............
My problem is if system goes panic and reboots then I need a mail which gives me the status of the script............ Like the scirpt got completed or Script was in progress and got killed......... so that I can rerun the script manually ........ I need your help and advice as how to trak this....
If no one minds can anyone give me an example script for the above scenario? :o
When i issue kill -9 <PID> it wont trap -9 and when
i give CTRL-C it traps and i can see the message SCRIPT INTERUPPTED!! in trap.log ............. but when server goes down it wont..... Please advice on this as i need to complete this activity by next two hours.....
this works if the main script gets killed by kill -9 or CTRL-C ......... but if system gets rebooted while the script is running ..... and during this interruption no mail is sent to us. that prgramm killed or interuppted.... any idea or some work around.....?