Fix NPE when avoiding multiple same tasks to run in one minute

Signed-off-by: walteryang <walteryang47@users.noreply.github.com>
Fix index out of bound exception when reading from weekdays string

Signed-off-by: walteryang <walteryang47@users.noreply.github.com>