I'm in no way an expert at this, but this is what I do.

The Sunday before a tri, I do a hard brick of at least the distance that the race is.

On Monday I do a hard swim, usually one go at the distance for the tri, then a few sprints afterwards.

Tuesday is rest day, usually do a little stretching, not much else.

Wednesday - light workot for what ever I feel like doing.

Thursday - another rest day.

Friday - I do a quick run to get my legs and lungs working again, enough to get my heart rate up but not enough to tire myself. For example, a 2mile run at a slightly faster pace that what I'm going to race at. (you can also do this on the bike or swim, whatever works best for you).

Saturday - race day!

Basically, I'm trying to get to Saturday rested, but with my body ready to go.