error/moodle/invalidrecord
From MoodleDocs
To fix this problem, try running the Cron lots of times until you see the message "Running clean-up tasks..." near the top of the output. See the discussion Can not find data record in database table context for further advice.