Move scheduler script to external file too