`schedule_hour` and `schedule_minute` should only be checked if `schedule_enable` is true.  Don't see a reason to have these set if we are disabling it.  Perhaps have this in:
```
if schedule_enable
...
end
```