Printer active flag?

The fan on my printer is rather noisy, which is not a problem when printing because the printer itself is louder, but when it's idle, it's just a bit annoying. Also I expect it's unnecessary: the amount of power it's pushing, I doubt that it needs the fan at all.
So I'm thinking to have it switch on when the printer starts.
What's the best way to do that?
I can see there are various plugins that could do it, but is there a simpler way?

Of course you could do that or (depending on your board) compile marlin with the option to turn the fan on at a certain temperature, but I would rather power the whole printer on when the print starts.

There are multiple plugins available for that task - for example to control a relay or smart plugs.

Personally I use the tasmota plugin and tasmota smart plugs.