Weird problem with scheduled jobs not running as expected
Two weeks ago I got an email from a customer that some data that was imported via a scheduled job seemed to be missing. So I logged into admin mode and checked the job history. And yes the job hadn't been run as it supposed to.I didn't think that much about it and settled for running it manually and changing the next scheduled date a couple of days ahead.
Since I was 100% sure this would be the end of the problem I didn't verify that the job actually did run on the new date which it didn't.
Hmm strange, and to make things even more strange I could see that other builtin jobs were running perfectly.
I never found out what the problem were exactly but clearing the scheduld job- and log-table fixed the issue. Thanks to the support for the script.
If you run into this and want to run the script below remember to do a db backup (you never now) and note down how the scheduled jobs are configured so you can reconfigure them after clearing the tables.
ALTER TABLE tblScheduledItemLog NOCHECK CONSTRAINT ALL
ALTER TABLE tblScheduledItemLog CHECK CONSTRAINT ALL