Fix crash when invalid config was given for cronlike schedule. fix #2742