remove redundant null check
add script scheduler api