Trying to add support for when_to_run