Add prolog function to schedule