Well, you can do it just with CUCM configuration (Time Periods, Time Schedules, Partitions and CSS). Why do you need to do it with UCCX script for just 2 lines?
Of course you can do it with UCCX scripts as well (let's say, for example, in Auto Attendant UCCX script you can add Time-of-day logic before you send the call to the line), but do you really need it?