Start time/end time and status of crontab job

Is there anyway to get the start time and end time / status of a crontab job which was just completed? Of course, we know the start time of the crontab job since we are scheduling. But I would like to know process start and time recorded somewhere or can be fetched from a command like 'ps'. Please suggest.

-Thambi

Suggestion : put a modification of date command in the start of the script, then in the end of the script and have it append to a log file. Then you'll be able to see the difference. Or : let's say that the crontab will execute /home/user/script.sh --> put "/usr/bin/time -f "{#%e#}" -o timelog -a" in the front, this will write the time for execution of the script in file called "timelog". Then "cat timelog" and the time reported will look something like : {#0.16#}
The other way basically is using merely "time", e.g "time ls -la", which will report :

but I don't think you can use it within cronjob, as it's reporting only to STDOUT, I tried to redirect the output to file - no dice. So /usr/bin/time should do the trick. HTH.

Thanks for suggestions. Actually , my crontab looks like as follows

00 18 * * 1-6 kdshell/remove_flag_files 1>kdlog/remove_flag_files_`date|awk '{print $2 $3 $4}'`.log 2>&1

They are already redirect the log information into a log file. This is stable existing system. I don't want to touch the script , Moreover , our client won't allow us to touch crontab script at all. So I wanted to know any other possibility without touch existing script. I think this is reason some organzation are going for Autosys or Control-M sechudling tool whould would show the start time and end time of the job in the their logs.

-Thambi

At the top & bottom of your script you can place:

echo "Started " `date` >>/tmp/tempfile
// script
// script
// script
echo "Completed " `date` >>/tmp/tempfile

Georgio