Scheduled Jobs Cleaner for Episerver
When inspecting application logs, I sometimes come across the following errors:
This error message indicates we had an active scheduled job, "Import Translation Package", which is removed from the code, but not from the tblScheduledItemLog and tblScheduledItem tables.
The same error message may appear if you try to rename a scheduled job. In version 10.3, Episerver made it possible to define GUID on the ScheduledJobPlugin attribute making it possible to rename jobs and still keep the log. If you don't set one, it will be auto-generated on application startup, when Episerver creates new entries in the tblScheduledItemLog and tblScheduledItem tables. If you rename a scheduled job without GUID, Episerver will create new entries in these tables, while keeping the old ones.
Cleaning up the tblScheduledItemLog and tblScheduledItem tables is a boring task, and sometimes we don't have direct access to the production database. For that reason, I've created an add-on that automatically removes ghost scheduled jobs from an Episerver database. It's available on Episerver NuGet feed, under name ScheduledJobsCleaner. You can find the source on GitHub: https://github.com/dejancaric/ScheduledJobsCleaner