diff --git a/app/src/main/java/com/termux/api/JobSchedulerAPI.java b/app/src/main/java/com/termux/api/JobSchedulerAPI.java index 52163b24..8d11c370 100644 --- a/app/src/main/java/com/termux/api/JobSchedulerAPI.java +++ b/app/src/main/java/com/termux/api/JobSchedulerAPI.java @@ -180,9 +180,12 @@ private static void displayPendingJobs(TermuxApiReceiver apiReceiver, Intent int ResultReturner.returnData(apiReceiver, intent, out -> out.println("No pending jobs")); return; } + + StringBuilder stringBuilder = new StringBuilder(); for (JobInfo job : jobs) { - ResultReturner.returnData(apiReceiver, intent, out -> out.println(String.format(Locale.ENGLISH, "Pending %s", formatJobInfo(job)))); + stringBuilder.append(String.format(Locale.ENGLISH, "Pending %s\n", formatJobInfo(job))); } + ResultReturner.returnData(apiReceiver, intent, out -> out.println(stringBuilder.toString())); } @RequiresApi(api = Build.VERSION_CODES.N)