When a cron event runs, clear it from cron entries

However, if it's scheduled to reoccur, reschedule the cron event. Adds functional tests.

See #1142