Scripting needed

Hi,

My task is to check the file test.txt every 15 min from Mon-Fri 9:00AM - 6:00PM. We get this file from our mainframes, every 15 min it will update the same file.
My task is to compare file timestamp with current system time stamp and check if the file is updated or not.
If the file doesn't updates in 30 min I need to fail the job & send email & also generate log file with when the job started and when it failed.

For the log file, I need to always append the start times and end times.

For example, If the job started at 9:00AM i should enter the start_time_1=9:00AM in the log and after 1 hour if the job failed I need to enter as end_time_1= 10:00AM.
Again we will re-run the job at 10:05 AM and this time i need to append start_time_2=10:05AM in the same log file and so on..........

My log file should look like

start_time_1=9:00AM
end_time_1=10:00AM
start_time_2=10:05AM
end_time_2=11:05AM
.
.
.
.
.
.
.
.
.
.

Please help.

Perl script or K-shell script is fine

Moderation: Closed due to homework rule violation - template not followed.