Afaik, a subscribed external read-only calendar resource is not updated instantly but by a background cron job as described here. I have in mind that the resource will be updated not more than once a week after it has successfully been loaded.
Even though cron jobs run very often (which is good anyway), calendar subscriptions get refreshed by default every week - unless the subscription says otherwise.
Can you please shed some light on how this parameter could be changed in the future, by setting a new configuration parameter, via a web dialog or by executing an occ command?
This looks to me like there might be a misunderstanding:
If you IMPORT an icalendar file - nothing will be refreshed.
You need to subscribe to the webcal-Link of the google calendar. @j-ed and @tcit are referring to a subscription not an import of an *.ics-file
Based on the commit log I assume this should work in 18.0.4? In my case, with 18.0.4, after having set calendarSubscriptionRefreshRate to PT1H, it still doesn’t seem to refresh at all, though.
I have a google calender subscribed to via an https://calendar.google.com/calendar/ical/my-email/private-id/basic.ics URL in my nextcloud calender but it hasn’t refreshed in a > 12 hours, i.e. it still shows test appointments I had deleted ~ 16h ago and doesn’t show new appointments created in the same timeframe.
There’s nothing in the nextcloud log and cron jobs are indeed running at a 5min interval. Verified that by setting a bad value for calendarSubscriptionRefreshRate in which case it logs an Sabre\VObject\InvalidDataException: The supplied iCalendar duration value is incorrect every 5 minutes.
Syncing the same feed in Thunderbird/Lightning shows the google calender as it actually is at this point in time, so I assume this is not a problem on the google side of things.
Have you double-checked that the changed value has been taken into account? As far as I remember the following command syntax need to be used to set the value:
Actually, I think the reason is elsewhere. I just deleted the calendar subscription and added it back in while having an eye on the log. Turns out there’s an exception
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'lastoccurence' at row 1 at <<closure>>
(full log here) The calendar still appears on nextcloud, but I guess this will block/prevent any further updates?
If I read the actual SQL statement in the debug log correctly, lastoccurence is actually -1942185600 in this case and the event is some yearly birthday event (which I guess never ends).
Meanwhile, I have narrowed it down further: I have some events in my google’s .ics file where the DTEND entry looks like this:
DTEND;VALUE=DATE:18991230
These seem to be birthday reminders from contacts (just a handful) and the date is obviously crap.
But I suppose the nextcloud importer should still handle that in a controlled fashion…
So, given that the respective table’s column is an unsigned bigint, I’ve simply added a < 0 check
for $lastOccurrence in CalDavBackend:getDenormalizedData
if ($lastOccurrence < 0) {
$maxDate = new DateTime(self::MAX_DATE);
$lastOccurrence = $maxDate->getTimestamp();
}
This causes the importer to continue w/o exception and subsequently the PT30M refresh to work, too. I guess I’ll create a bug report.
Even though this post is rather old, I came across it when attempting to export data from a Nextcloud server. This calcardback little ditty is a treat!
It will export/backup both contacts and calendar with pure perfection! Even if one is unable to access Nextcloud via the web interface for any reason. Brilliant!