add lockrun and whenever for scheduler server