Not directly related with cron, but detectez while monitoring it.
Petr has detected that on course deletion, records aren't deleted from the user_lastaccess table. Fixing includes:
- delete such records in the delete_course() function
- delete such records if necessary in reset_course()
- delete when one user auto unenrol from one course?
- as part of the upgrade, delete all records belonging to nonexistent courses.
Call this the ORPHAN_BY_COURSE_DELETE_PROBLEM.