Break a circuit on a alarm clock

There is a possibility that the switches operate in a matrix - this means that the switches are connected between row and column lines to the clock chip - in this case the PC817 will not work.
If however, you find that there is a common connection to all of the switches and the other sides of the switches go off separately, then yes the PC817 will work if connected the right way around on each switch