How to change next execution time of recurring jobs - building a carbon aware extension

Hello community,
I’m building a carbon aware computing extension for hangfire (GitHub Repro). The idea is to shift the execution time when the power grid is powered by renewables.

What I need is to change the execution time of the job. I could manage this for enqueue & schedule, which is a simple task.

Now, I look forward for a solution to hook to the calculation of next execution time for recurring jobs.

I see the TryGetNextExecution in RecurringJobEntity (Hangfire.Core) method which is calaculation the time. It is called from RecurringJobScheduler:Execute. But I hav’nt find any extension points to hook into and change the time.

Has anyone an idea how to manage this?

Best regards

Ok, just get the idea.
As I see, there is no way to change the execution time of an instance of the recurring job. What I do, is to prevent the execution of that instance by a own version of the IStateMachine. If there is a option for carbon aware computing I schedule the job. For more details see the Project.