[TYPO3-core] RFC #12068: Bug: Scheduler: Improper skipping of running tasks in case multiple execution denied
Francois Suter
fsu-lists at cobweb.ch
Mon Sep 28 08:50:51 CEST 2009
This is an SVN patch request.
Type: Bugfix
Bugtracker references:
http://bugs.typo3.org/view.php?id=12068
Branches:
Trunk
Problem:
The Scheduler has a mechanism for preventing multiple concurrent
executions of the same task. This is logged into the sys_log table. If a
CLI call is running and a new one starts while the previous run is not
finished (which happens e.g. with a cron job because it will fork its
process if the previous one is not finished), the Scheduler runs into an
endless loop and floods the sys_log table.
Solution:
The next execution time of task must be calculated when the task is
launched and not after it has finished. It must also be calculated when
a task is skipped, in order to postpone it to the next execution time in
the schedule. This prevents the endless loop.
Notes:
Changing the position of the save() call (which calculates the next
execution date) has a slight impact on success/failure reporting. Indeed
tx_scheduler::executeTask() used to return the status of the save() call
when a task had been executed. This was wrong anyway as a failure was
reported as an execution failure, whereas it could have been a DB update
failure. After this patch the Scheduler will report correctly as to the
execution, but there's no reporting in case of DB update failure. This
should be corrected, but in a separate RFC (it is not trivial given the
current process).
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rfc12068.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090928/22576a36/attachment.txt
More information about the TYPO3-team-core
mailing list