Fixes #4623: define schedule of agent