Server has no maintenance window start time configured

It’s a newer check, but all is does it make sure that parameter has a value and I don’t see any obvious bugs in the code.

Are you sure things are quoted correctly? Can you provide the parsed by running occ config:list system?

Sure!

ou may use your browser or the occ upgrade command to do the upgrade
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            ***REMOVED SENSITIVE VALUE***
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.8.2",
        "overwrite.cli.url": "https:\/\/mycloud.cloudns.ph\/",
        "htaccess.RewriteBase": "\/",
        "memory_limit": "1024M",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "GR",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1
    }

Tengo el mismo inconveniente todo andaba de maravilla sin alertas o errores hasta esta nueva actualización no se que deba modificar para resolverlo me gusta ver todo perfecto

"version": "25.0.8.2",

That can’t be your active configuration. It’s for NC25! :slight_smile:

hi guys ,did u resolve this problem?
i get same one ,when i update to 28.0.2

There’s a link in the warning message to the documentation

You have to add the following line line to your config.php:

'maintenance_window_start' => 1,

1 stands for the hour when you want the maintainenance window to start in UTC time, so in the above example the maintainenance window starts at 01:00 UTC Time.

Nextcloud Documentation:
https://docs.nextcloud.com/server/28/go.php?to=admin-background-jobs

What is UTC time?:
https://www.utctime.net/

UTC time zone converter:
https://www.utctime.net/utc-time-zone-converter

3 Likes

Amigo exactamente en que lugar de la configuracion php debe ir
‘maintenance_window_start’ => 1,

Anywhere except in an array. If you want to be on the safe side, place it in the second last line above the );

Or you could use the occ config command.

Example:

sudo -u www-data php /path/to/nextcloud/occ config:system:set maintenance_window_start --value="1" --type=integer`

mil gracias esa era la solución vuelvo a tener todo en orden

1 Like

Worked for me
‘maintenance_window_start’ => 1, in the Config.php file
be sure to restart apache2 and PHP (as applies) and then reboot.
Notice gone

3 Likes

What you mean it’s 25.0.8.2? I am updating again to check!

it is really work now, thank you very much.

2 Likes

Still the same. I updated to 28.0.2, restarted apache and php service, waited for a day.

@huhas12 The configuration you posted yesterday was for NC25. Are you sure you’re modifying your live configuration? Or perhaps do you have a second Nextcloud Server installation active?

It would have been nice to add this parameter to the configuration page before adding the warning about it, especially since it needs to be in UTC, making it really easy to set an inappropriate time. Can we get a selector in the configuration when CRON method is selected that allows setting this parameter using a local time selector?

1 Like

I wrote a small bash script that sets the parameter based on the local time of your server. Maybe it is of any help:

#!/bin/bash
#
# Set the local time when you want the maintenance window to start:
# (Only use full hours in 24hrs (HH:MM) formating) e.g. "00:00" "01:00" "02:00" etc...)
#
TIME="01:00"
#
# Set the path where your Nextcloud is installed:
#
NCPATH="/var/www/nextcloud"
#
# Set the web server user:
#
WWWUSER="www-data"
#
# DO NOT CHANGE ANYTHING BELOW THIS LINE!
#
LOCALSTARTTIME=$(date -d "$TIME" +%s)
UTCSTARTTIME=$(date -u -d "@$LOCALSTARTTIME" "+%-H")
sudo -u $WWWUSER php $NCPATH/occ config:system:set maintenance_window_start --value="$UTCSTARTTIME" --type=integer
exit 0

This may be of interest to those of you who, like me, don’t want to set a time window at all. So all tasks should be able to be started at any time.
In order for the message to disappear anyway, you have to deactivate the time window with the value 100:

  'maintenance_window_start' => 100,

ernolf

4 Likes

Good to know, and thanks for sharing. :slight_smile:

Is this documented somewhere, or how did you find out?

Documented here:

… and since it only checks IF it is set to any value at all to supress the warning:

Find out here, that you can deactivate the time window with any value greater than 23:

:wink:


ernolf

2 Likes

Ah yes, the config.sample.php file, I should have thought of that myself :wink:

Thanks :slight_smile:

EDIT: In the meantime it’s also in the docs: Configuration Parameters — Nextcloud latest Administration Manual latest documentation

Or maybe it has been since the feature was introduced, and I didn’t find it? Never mind. It’s in there now. :wink: