I would like the metronome to play a few measures or seconds and then no longer play.

Is this possible

Optional Click Track Duration[_____]

About half-way down the generate panel settings.

This may only be available in Audacity 2.0.3.


Audacity does not have a metronome. Are you referring to “Click Track”? Audacity Manual
If you mean Click Track, then you can generate a click track with as many or as few beats as you require. The click track is just an ordinary audio track, so you can edit it to make it shorter just as you would for any other audio track.