diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 87fb006..d06f581 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -2172,8 +2172,14 @@ top:
 				st->listen = true;
 		}
 
-		/* after a meta command, immediately proceed with next command */
-		goto top;
+		/*
+		 * After a meta command, immediately proceed with next command...
+		 * although not if last. This exception ensures that a meta command
+		 * only script does not always loop in doCustom, so that other tasks
+		 * in threadRun, eg progress reporting or switching client, get a chance.
+		 */
+		if (commands[st->state + 1] != NULL)
+			goto top;
 	}
 
 	return true;
