From e25fd7de9e415a782e27a8c423f54a6b50eb543c Mon Sep 17 00:00:00 2001 From: DarioViva42 Date: Mon, 16 Mar 2026 16:30:38 +0100 Subject: [PATCH] improve description // case: every x hours --- .../com/cronutils/descriptor/TimeDescriptionStrategy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cronutils/descriptor/TimeDescriptionStrategy.java b/src/main/java/com/cronutils/descriptor/TimeDescriptionStrategy.java index bd397840..89c5edc7 100644 --- a/src/main/java/com/cronutils/descriptor/TimeDescriptionStrategy.java +++ b/src/main/java/com/cronutils/descriptor/TimeDescriptionStrategy.java @@ -249,13 +249,13 @@ private void registerFunctions() { return String.format(EVERY_MINUTE_FORMAT, bundle.getString(EVERY), bundle.getString(HOUR)); } } - final String result = String.format("%s %s %s %s %s %s ", bundle.getString(EVERY), + final String result = String.format("%s %s %s %s %s %s", bundle.getString(EVERY), ((Every) hours).getPeriod().getValue(), bundle.getString("hours"), bundle.getString("at"), bundle.getString(MINUTE), ((On) minutes).getTime().getValue()); if (TimeDescriptionStrategy.this.isDefault((On) timeFields.seconds)) { return result; } else { - return String.format("%s %s %s", bundle.getString("and"), bundle.getString(SECOND), + return result + String.format(" %s %s %s", bundle.getString("and"), bundle.getString(SECOND), ((On) seconds).getTime().getValue()); } }