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 :
Quote:
real 0m0.119s
user 0m0.008s
sys 0m0.011s
|
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.