Tuesday, March 21st, 2023 | Server
< cfscript> // Access the Task Scheduler taskService = createObject("component", "lucee.runtime.schedule.TaskService"); // Get all tasks tasks = taskService.listAll(); // Loop through tasks and delete failed tasks for (task in tasks) { if (task.status == "failed") { taskService.remove(task.id); } } < /cfscript>