Do you leave electric heating cables for the roof/gutter on 24 hours a day?
Probably not, but...
You'll need to read the literature that undoubtedly came with your heat cable (or, at a minimum, share with us what product you're using). Generally, they shouldn't be left on continuously, and they shouldn't be on when outdoor temperatures get above 30 degrees F, give or take. What cycle you need depends on the local climate, current weather, installation technique, and other factors.
Lots more good advice here.
My heat cables are temperature-controlled. They turn on when temperatures drop below 38 °F and turn off when they rise above 50 °F, so I turn them on prior to the first freeze and will keep them on until night time temperatures stay above 45 °F for a while. It takes time for them to warm up and the units I have were fixed-temperature, with no adjustment.
It saves a bundle with PVC gutters because they don't draw much and I haven't lost another gutter since installing the heat tape. To make it clear, I turn my cables on 7/24 in November they are still on almost March. We had another light freeze this weekend. My unit has a temp sensor and will only heat when needed. I do inspect them when I clean the gutters.