move the json bit into scheduler.py