Help with a simple Cron job to understand the concept

The time range switch node looks perfect for your use case, but just for completeness that code should be something like
let myHour = (new Date()).getHours();
which will give you the hours in the range 0 to 23.