Clarification on 'maintenance_window_start' timezone in config.php (Nextcloud 27.0.1)

Hi everyone,

I’m using Nextcloud 27.0.1 on the following stack:

PHP: 8.0.13

OS: Rocky Linux 9.2

Web server: Apache 2.4.51

I want to clarify the behavior of this setting in my config.php:

ā€˜maintenance_window_start’ => 1,

According to the Nextcloud documentation, this defines the start hour of a maintenance window during which background jobs (like updates) run — supposedly in UTC.

However, my server is set to the Asia/Kolkata timezone (IST), and when checking logs, I see maintenance/background jobs are running around 1:00 AM IST, which suggests the system might be using server local time instead of UTC.
:red_question_mark: My Questions:

In Nextcloud 27.0.1, is the 'maintenance_window_start' value interpreted in UTC or server local time (IST)?

If it's in UTC, then should I adjust the value (e.g., set 20 to get 1:00 AM IST)?

Is there a recommended way to confirm this from logs like nextcloud.log or cron output?

Has this behavior changed in newer versions?

Thanks in advance for any help in clarifying this behavior. :folded_hands:

Official docs:

which time i need to follow server timezone or UTC

that depends on where the server is located:
if in doubt use UTC (Universal Time Coordinated)

Are you sure that this ā€œPrivacy → Where is your dataā€ setting actually does anything functional on the server, apart from simply showing users where the admin claims the server is located?

I’ve actually been wondering about the maintenance_window_start option for a while. Does it really always use UTC (as the documentation suggests), or does this depend on other factors, such as the system time zone, the time zone setting in php.ini or maybe even the ā€œWhere is your dataā€ setting"?

I’d also be interested to know which exact jobs are affected by this setting (yeah I know, this could probably be found in the code, but I’m not a coder), whether they’re logged and, if so, at which log level. This would allow me to determine if and when they are actually executed.

1 Like

nope i’m not sure, but bar having any other possibility specifying where the server is located, this seems plausible?

I’ve not discovered anything contrary…

neither am I :nerd_face:

Me neither, but to be honest, I’ve also never really been able to confirm that it actually works that way, and OP’s post made me a bit unsure again.

The question wasn’t directed only at you anyway, but it would be nice if somoene could provide some insight.

It’s mostly out of curiosity. For us, it doesn’t really make much of a difference anyway. Like you, I live in the UTC+1 timezone (UTC+2 during summer), and I’ve configured it to 0. So whether those maintenance jobs run at midnight, 1 a.m., or 2 a.m. doesn’t matter much to me, but it would still be interesting to know. :grinning_face_with_smiling_eyes:

1 Like

@bb77

this is a bit concerning:

as far as I can recall, the compulsory maintenance window configuration only arrived in v30. so I’m assuming on that old unsupported version, any configuration will fail regardless?

Oh, I didn’t even notice that! :man_facepalming:

In that case, my main concern would be that I’m using an unsupported version rather than the timing of the maintenance jobs. :wink:

Nextcloud 27 supports maintenance_window_start but the doubt is which time it takes

If anyone of you guys have an idea, please drop it

Thanks

support is discontinued…

Unreleated to the actual topic of this thread: But you should still update to a supported version. Nextcloud 27 has been End of LIfe since June 2024. Maintenance and Release Schedule Ā· nextcloud/server Wiki Ā· GitHub

yes we are planning to upgrade, but the setup is in intranet and without internet so we need to update it manually to latest stable version

It specifically uses UTC, as documented.

Code is here:

You can see the expected value by running the code in isolation here:

Keep in mind this setting doesn’t mean all background jobs will run at the specified time. Just the ones that have specified themselves to not be time sensitive.

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.