1:It’s better if the bath fan runs for 5 or 10 minutes after every shower.This can be accomplished with a “delayed off” switch (for example, the Lutron Maestro) that keeps a fan running
  for a set amount of time after the switch is turned off. The delay is user-adjustable.
2:It’s also possible to install a humidity-sensing switch that turns a fan on whenever the indoor relative humidity reaches a preset level.