Can I use mains or generator power to run the pump on cloudy day?

Can I use mains or generator power to run the pump on cloudy day?

The controller does not have the input for mains or generator power but the pump can be powered by means of a DC power supply that can supply the controller the correct voltage and amperage for the pump to operate efficiently.