Make DelayedPostsEnableCronjob roll back on Exception

Previously the transaction remained open, blocking updates of
the CronjobScheduler

Also: Check whether the ID arrays are not empty before attempting
to update the data.