diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php
index a8f4ade8b4d..d556804e317 100644
--- a/htdocs/cron/list.php
+++ b/htdocs/cron/list.php
@@ -520,12 +520,13 @@ if ($num > 0)
print '';
print '
';
- if(!empty($obj->datenextrun)) {
+ if (!empty($obj->datenextrun)) {
+ $datenextrun = $db->jdate($obj->datenextrun);
if (empty($obj->status)) print '';
- print dol_print_date($db->jdate($obj->datenextrun),'dayhour');
- if (empty($obj->status)) print '';
+ print dol_print_date($datenextrun,'dayhour');
if ($obj->maxrun && $obj->nbrun >= $obj->maxrun) print img_warning($langs->trans("MaxRunReached"));
- elseif ($obj->datenextrun && $obj->datenextrun < $now) print img_warning($langs->trans("Late"));
+ elseif ($datenextrun && $datenextrun < $now) print img_warning($langs->trans("Late"));
+ if (empty($obj->status)) print '';
}
print ' | ';