Problem in defining a variable as multiplication
unsigned long onPeriod = 60ul * 1000; 

ul makes 60 to unsigned long and then the calculation has place for result.

without ul the constants and the result are int and it overflows