Introduce a default refresh rate app setting for calendar subscriptions

Hi,

I use NC 17.0.4 and have subscribed to an external calendar via WebDav.

I would like to increase the update rate from one week to e.g. 30 minutes or 1 hour.

As of version 17.0.4, this can be changed, to my understanding (“Introduce a default refresh rate app setting for calendar subscriptions (server#19785)”).

But how do I do it? Where do I make the settings?

Do I have to change the value “P1W” to “P30M” or “P1H” in the “apps/dav/lib/BackgroundJob/RefreshWebcalJob.php”?

I would be very grateful if someone could help me with this.

The update interval of the subscribed calendar of one week is too long for me :wink:

It’s about a subscribed calendar via the web interface, not subscriptions to calendars with other devices.

Greetings,
Julix

Hi Julix,

I’ve managed to configure this setting with
nextcloud.occ config:app:set --value "PT2H" dav calendarSubscriptionRefreshRate
and now it seems to work as intended and update the subscriptions every two hours. I’m using the nextcloud snap version, so you may need to call the occ command slightly different depending on your setup. Hope this helps.

Best regards,
Michael

1 Like

Just posting this for the next person who winds up here and is momentarily confused:

So for 30 minute refresh, would it be “PT30M” or “P30M”

The Nextcloud instructions here:
https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html

…point to PHP use of DateInterval here:
https://www.php.net/manual/en/dateinterval.construct.php

Which states…

The format starts with the letter P , for period. Each duration period is represented by an integer value followed by a period designator. If the duration contains time elements, that portion of the specification is preceded by the letter T .

So since every “30 minutes” is time, it would be “PT30M”

Hope this helps someone who winds up here confused as I was for a moment. :slight_smile:

That https://www.php.net/manual/en/dateinterval.construct.php doesn’t make much sense to me.

What is a “time element”? Every 1 hour seems to be P1H but every 30 minutes is PT30M. So is every 2 hours PT2H or P2H? Do I need a T if the frequency is >1 ?

Sorry, really confused here…