Cannot activate update while task is running or scheduled

Thanks for the new experimental version. Download and install works fine, but when I then want to activate it, I get:

Activate failed: Cannot activate update while task is running or scheduled

Does that mean that I need to turn off every single one of my backup jobs, activate the new version and then turn all the jobs back on again?

Mine worked like a charm. Have you made sure that no backup jobs were running when you tried to activate the new version. Also try disabling the scheduler in your jobs to see if it makes a difference?

That was the point of my question: do I really need to disable all my schedules just to install the update?

No… You will have to wait for jobs to be completed, but schedules can remain.

Strange. So you are saying that’s how it works for you? Because I don’t have any jobs running and it still won’t activate. And if the schedules can remain, why does it say “Cannot activate update while task is running or scheduled”?

Sorry, that’s how I believe I have seen it working. Can’t stimulate this now.

Have you actually tried to disable the schedules to see whether the update will apply. This will indicate whether there’s a problem with the code?

As far as I know @Wim_Jansen is correct.

In the code the error you’re seeing is only shown if there is a currently running task (“activeTask” in “Help -> System Info -> Server state properties” of the GUI) or a queued task (which I THINK is "schedulerQueueIds on that same page).

Note that “schedulerQueueIDs” are tasks that will start as soon as the current task (or “pauseTimeRemain” is done which differs from the “proposedSchedule” which are tasks scheduled to begin at a future time.

My guess is that if when you get the “Cannot activate update” message and you check your “Server state properties” you’ll see that either there is an “activeTask” listed (even if the main progress bar might not be showing it, in which case there’s a GUI-vs-server-activity bug - which has happened before) and/or there are “schedulerQueueIDs”.

In my test I had no activeTask, however there was a schedulerQueueID waiting on the pauseTimeRemain (“Pause after startup or hibernation” in main settings) to finish counting down.

Interesting, in case others get here now, it happened when I did a big version upgrade and the new .NET framework was required. Closing Duplicati and reopening it, asked to install a new version, etc.

Welcome to the forum @anthonyhorne_za

If you’re saying that a new Duplicati triggered a .NET Framework install, what OS is this that doesn’t automatically update .NET Framework which has been functionally “done” and not moving recently?

It was for Server 2016 Version 1607. Hosting provider policy to not automatically update automatically, instead requires action by owner. Nothing wrong with what Duplicati did, but the error message was a little misleading for this scenario.

Thanks. I suspected it might have been a Windows Server. Those seem to give more flexibility in updates, compared to non-Server versions. I don’t have a Server version to test to reproduce this on, which I guess would take something like downgrading server to a suitably old .NET Framework, then upgrading Duplicati.

2.0.6.1_beta_2021-05-03 needs .NET Framework 4.7.1 (2017-10-17).
2.0.5.1_beta_2020-01-18 needs .NET Framework 4.6.2 (2016-08-02).

Upgrade activation is not totally reliable even without this, but thanks for noting one more possible cause…
If you’re good at .NET Framework version manipulation, feel free to file an issue with some precise steps, however the chances seem great that developer and equipment shortages will get in the way of a fast fix.