Umbraco v13 IRecurringBackgroundJob not following Period
c
Hello everyone! I have implemented the IRecurringBackgroundJob, but something seems wrong. I've scheduled it to repeat after 3 days, and after 7 days, but it's repeating every day. This is happening in Umbraco Cloud and I am suspicious it has to do with a restarting IIS process, but I cannot be certain. Does anyone have any suggestions or fixes to revolve this? please see attachment
Copy code
public TimeSpan Period => TimeSpan.FromDays(7);
        public TimeSpan Delay => TimeSpan.FromHours(24);
https://cdn.discordapp.com/attachments/1248047040538214520/1248047040680824862/message.txt?ex=66623de2&is=6660ec62&hm=8dab93f684980f82323256dc03db5582bad7cf434b0184dc11eb8b8e4d4189fd&
Does anyone have any ideas what could be wrong? please 🥹
s
Can you see if it actually restarted? You could hack it by setting a marker somewhere in a database table or something to note when the last run time was.
Otherwise, Hangfire has a good scheduling system, I believe it survives restarts as it actually logs when tasks have been ran. https://marketplace.umbraco.com/package/cultiv.hangfire
c
Thank you Sebastiann, I'll try that
109 Views