add schedule APIs to js