creating workflow for scheduler