The timebase for calculation of `afterNextExec` is equal to `nextExec` in order to find any date after this time for execution. Unfortunately this timebase is already a valid date and thus is used as result (now `nextExec` and `afterNextExec` are equal). To fix this, we simply add 1 to the `nextExec` timestamp, making it an invalid date for next execution (we do not support seconds anyway!).
$nextExec = $cronjob->getNextExec();
$cronjob->update(array(
'nextExec' => $nextExec,
- 'afterNextExec' => $cronjob->getNextExec($nextExec)
+ 'afterNextExec' => $cronjob->getNextExec(($nextExec + 1))
));
// build the return value
// get time of next execution
$nextExec = $cronjobEditor->getNextExec();
- $afterNextExec = $cronjobEditor->getNextExec($nextExec);
+ $afterNextExec = $cronjobEditor->getNextExec(($nextExec + 1));
// mark cronjob as done
$cronjobEditor->update(array(