Break a circuit on a alarm clock

Thanks @daveve
If I do test the current on the clock and connect them the right way, then the PC817 will do the job?