Yes & no. Ha. It is not mandatory to run 24/7. That depends on the needs of the pool, amount of debris that may land on the surface, etc. I leave my pump on low speed 24/7. It's just easier that way for me. Don't be fooled by turnover recommendations as that has no bearing. Mixing chemicals, vacuuming, and keeping the water's surface cleann are most important. If you choose to run less time, that's fine. See the link below for more info.
To figure out how many hours you need to run your pump, you need to know how fast your pump works. You can find this here.
www.troublefreepool.com