Pool pomp automation

Hi.
Need help with pool automation. I have a pool solar heater, want to turn on pomp for 3 minutes every half hour and want to run it from 9:00 to 19:00.
Second think i want to run pomp from 10:00 to 15:00 without any breaks.
From 9:00 to 10:00 3 minutes every half hour, from 10:00 to 15:00 without breakes, from 15:00 to 19:00 again 3 minutes every half hour.

type: turn_on
device_id: 01931fca9ae0c20b185c3990e0d9a795
entity_id: switch.pompa_studnia
domain: switch

type: turn_off
device_id: 01931fca9ae0c20b185c3990e0d9a795
entity_id: switch.pompa_studnia
domain: switch

Hope u could help me .