[TASK] Use Environment API in scheduler