fixed issue #47: regression due to improvement buggy fix #37
fixes issue #46: cron not recording last execution
Merge remote-tracking branch 'refs/remotes/origin/master' into MOODLE_23_STABLE