File tree Expand file tree Collapse file tree
src/main/java/com/cronutils/model/time Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,10 +72,37 @@ public static ExecutionTime forCron(final Cron cron) {
7272 }
7373 }
7474 return executionTimeBuilder .build ();
75- } else {
75+ }
76+ if (cron instanceof CompositeCron ) {
7677 return new CompositeExecutionTime (((CompositeCron ) cron ).getCrons ().parallelStream ().map (ExecutionTime ::forCron ).collect (Collectors .toList ()));
7778 }
7879
80+ return new ExecutionTime () {
81+ @ Override
82+ public Optional <ZonedDateTime > nextExecution (ZonedDateTime date ) {
83+ return Optional .empty ();
84+ }
85+
86+ @ Override
87+ public Optional <Duration > timeToNextExecution (ZonedDateTime date ) {
88+ return Optional .empty ();
89+ }
90+
91+ @ Override
92+ public Optional <ZonedDateTime > lastExecution (ZonedDateTime date ) {
93+ return Optional .empty ();
94+ }
95+
96+ @ Override
97+ public Optional <Duration > timeFromLastExecution (ZonedDateTime date ) {
98+ return Optional .empty ();
99+ }
100+
101+ @ Override
102+ public boolean isMatch (ZonedDateTime date ) {
103+ return false ;
104+ }
105+ };
79106 }
80107
81108 /**
You can’t perform that action at this time.
0 commit comments