#25615Scheduler floods sys_log in endless loop if a task is running and multiple executions isn't allowed
Description
How to reproduce:
- Create a sleep test task with 300 seconds
- Call the scheduler cli to start the 5 minute task
- Call a second cli while the first cli is still running. This cli will only end after the first cli terminated, hammering sys_log table as fast as it can with messages like “[scheduler]: Task is already running and multiple executions are not allowed, skipping! Class: tx_scheduler_SleepTask, UID: 3”
This is because the fetchTask() in the cli class fetches the running task again and again so that hasTask will never be false:
The following queries will be executed in an endless loop until the first cli terminates:
157 Query SELECT serialized_task_object
FROM tx_scheduler_task
WHERE
disable = 0 AND nextexecution != 0 AND nextexecution <= 1253990423
LIMIT 1
157 Query SELECT serialized_executions
FROM tx_scheduler_task
WHERE
uid = 3
LIMIT 1
157 Query INSERT INTO sys_log
(
userid,
type,
action,
error,
details_nr,
details,
log_data,
tablename,
recuid,
IP,
tstamp,
event_pid,
NEWid,
workspace
) VALUES (
‘20’,
‘4’,
‘0’,
‘0’,
‘0’,
‘[scheduler]: Task is already running and multiple executions are not allowed, skipping! Class: tx_scheduler_SleepTask, UID: 3’,
‘a:0:{}’,
‘’,
‘0’,
‘’,
‘1253990423’,
‘-1’,
‘’,
’0’
)
(issue imported from #M12068)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.