Missing reprogramming task into GUI for cron module.
Without this, a new task is never executed (because without datenextrun defined)
This commit is contained in:
parent
05fe8e45b3
commit
fdbf2fb45d
@ -95,9 +95,18 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||
$action='';
|
||||
$res = $object->reprogram_jobs($user->login);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -100,6 +100,21 @@ if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->ex
|
||||
if ($result < 0) {
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
$res = $object->reprogram_jobs($user->login);
|
||||
if ($res > 0)
|
||||
{
|
||||
if ($object->lastresult > 0) setEventMessage($langs->trans("JobFinished"),'warnings');
|
||||
else setEventMessage($langs->trans("JobFinished"),'mesgs');
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: ".DOL_URL_ROOT.'/cron/list.php?status=-1'); // Make a call to avoid to run twice job when using back
|
||||
exit;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user