Bug #86420

Scheduler executes deleted tasks

Added by Alexander Opitz about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
scheduler
Target version:
Start date:
2018-09-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Since #79777 tasks do not get removed from database, but marked as deleted.
But the function "fetchTask($uid = 0)" in the Scheduler class wasn't updated accordingly. This function builds an own SQL with QueryBuilder with "$queryBuilder->getRestrictions()->removeAll();" so we also fetch disabled tasks.

#1

Updated by Jan Helke about 2 years ago

  • Status changed from New to Accepted
  • Assignee set to Jan Helke
#2

Updated by Jan Helke about 2 years ago

How to test:

- Pick a random scheduler task. Or create a new Scheduler test task (scheduler) with a very low frequency
- run "./bin/typo3 scheduler:run - i <ID> --force"
- Check in the scheduler module that the task ran and make a note of the Last Execution time
- Delete the task
- Grab a coffee (it should take a minute or more to see the change in the Execution time)
- run "./bin/typo3 scheduler:run - i <ID> --force" again
- Go to the Database and restore the task
- Go to the scheduler module and see, that the Execution Time changed

#3

Updated by Jan Helke about 2 years ago

Other case:

- Pick a random scheduler task. Or create a new Scheduler test task (scheduler) with a very low frequency
- run "./bin/typo3 scheduler:run" (runs all tasks)
- Check in the scheduler module that the task ran and make a note of the Last Execution time
- Delete the task
- Grab a coffee (it should take a minute or more to see the change in the Execution time)
- run "./bin/typo3 scheduler:run" again
- Go to the Database and restore the task
- Go to the scheduler module and see, that the Execution Time changed

#4

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58439

#5

Updated by Jan Helke about 2 years ago

Both issues should be fixed with this patch.

#6

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58439

#7

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58439

#8

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58504

#9

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58439

#10

Updated by Benni Mack about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#11

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF