run pd-extended and flask automatically