Here's a puzzler......
I put a permanent wall fan in my barn at the eaves. This is a small motor fan, probably 1/10 to 1/4hp.at most. It's just there to vent out the heat in the summer and/or manure odor. It makes the barn better for animals. There is a control on the fan to turn it on at a specified temperature (such as over 75deg). The outlet in the adjoining feed room was the closest outlet, and is on a 20A breaker. I needed to get this fan running this last summer when the outdoor temp went above 90 deg. and I had a sick horse in there. I was out of #12 romex, so I ran some #14 that I had. To speed up the job even more, (and knowing it would have to be replaced), I did not hard wire to the outlet, I just put a grounded plug on the end of the romex and plugged it in to the outlet. As in all farm operations, nothing ever gets done before some other job or chore comes along, so I have left it the way it was. In some sense, I almost wonder if I should just leave it, and I can unplug it during the cooler weather since it's not needed.
My question is whether using #14 wires is up to code, when it's not hard wired? For example, many lamps, radios, and other small appliances have #18 or #16 cords, and they are plugged into 15 or 20 A circuits. I'm just curious. One of these days I might find the time to wire this properly and will have to add a switch so I can turn it off when I want. But for now, it works and is safe at least according to common sense, if not the code.
Alvin