Job keeps getting disabled

Hi,
I’ve been using Hangfire(now on v 1.8.3) for a recurring job for about a year now without a problem. Recently my job has started getting disabled every few days with the message “Cron job invalid or no occurrence in the next 100 years”. My cron expression is 0 7,12,16,20 * * * and seems valid. Whenever the job gets disabled, I delete it and then restart the application pool and the job works again for a day or two. Here’s the code I use to setup the job:

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IRecurringJobManager backgroundJobs)
        {

            backgroundJobs.AddOrUpdate<FetcherManager>("FetchData", mgr => mgr.Run(), "0 7,12,16,20 * * *", new RecurringJobOptions { TimeZone = TimeZoneInfo.Local });

What could be the cause of this ?

Thanks

1 Like

I am having the same issues it started 2 days ago.

The first job ran just fine, i changed the cron time but nothing helps.

V1.8.5 seems to have fixed the problem. Going on about a week without failures.