File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 77use Doctrine \DBAL \Types \Types ;
88use Doctrine \ORM \Mapping as ORM ;
99use Dukecity \CommandSchedulerBundle \Repository \ScheduledCommandRepository ;
10+ use Lorisleiva \CronTranslator \CronTranslator ;
1011use Symfony \Bridge \Doctrine \Validator \Constraints \UniqueEntity ;
1112use Symfony \Component \Validator \Constraints as Assert ;
1213use Dukecity \CommandSchedulerBundle \Validator \Constraints as AssertDukecity ;
@@ -325,4 +326,13 @@ public function getNextRunDate(bool $checkExecuteImmediately = true): ?DateTime
325326
326327 return (new CronExpressionLib ($ this ->getCronExpression ()))->getNextRunDate ();
327328 }
329+
330+ public function getCronExpressionTranslated (): string
331+ {
332+ try {
333+ return CronTranslator::translate ($ this ->getCronExpression ());
334+ }
335+ catch (\Exception $ e )
336+ {return 'error: could not translate cron expression ' ;}
337+ }
328338}
Original file line number Diff line number Diff line change 5555 {{ command .command }} {{ command .arguments }}
5656 </td >
5757 <td >
58- {{ command .cronExpression }}
58+ < span title = " {{ command.getCronExpressionTranslated () }} " >{{ command . cronExpression }}</ span >
5959 </td >
6060 <td >
6161 {{ command .logFile }}
You can’t perform that action at this time.
0 commit comments