By analyzing the logs produced by cron we realize that we have messages about adhoc task:
Execute adhoc task: core_course\task\course_delete_modules
... started 00:23:14. Current memory use 58Mo.
... used 305 dbqueries
... used 1.8822832107544 seconds
Adhoc task failed: core_course\task\course_delete_modules, Coding error detected, it must be fixed by a programmer: : The course module 1573757 could not be deleted. #0 /app/apache2/htdocs/moodle/course/classes/task/course_delete_modules.php(66): course_delete_module('1573757')
#1 /app/apache2/htdocs/moodle/lib/cronlib.php(119): core_course\task\course_delete_modules->execute()
#2 /app/apache2/htdocs/moodle/admin/cli/cron.php(61): cron_run()
#3 {main}
When we check in database those modules are no longer present in there corresponding tables. So the adhoc task try to reexecute the delete every day and than pollutes the logs.
We are wondering why there is an entry in task_adhoc table if the modules were removed for the tables.