Stop KOrganizer from updating .ics file every 5 minutes

I’m using Arch Linux with the XFCE desktop environment.

In KOrganizer, I disabled “Monitor for changes” & “Automatically update every X minutes” in the individual calendar configuration.

Despite this, KOrganizer keeps updating the corresponding .ics file every 5 minutes. I know this because I the folder where every .ics is located in is synced to my cloud; so I have a log of all the (unnecessary) file versions being created in the cloud.

I know about stopping akonadi with akonadictl stop or kill -9 $(pgrep akonadi) but I’m looking for a better alternative.

How can I prevent KOrganizer from updating its .ics files every 5 minutes?

In my setup I have “Monitor for changes” on but the other settings off as well and the file remains unchanged unless I modify that calendar.

Can you check the contents of the respective configuration file?

For me the file is $HOME/.config/akonadi_ical_resource_2rc where the 2 is a counter so that could be any other number as well.

In my file there is essentially only the path to the ics file with the other settings being their respective defaults (monitoring ON, periodic update OFF)

I forgot to mention that this is my first time using KOrganizer or working with akonadi, so please forgive me if I don’t know where each config file is.

The file $HOME/.config/akonadi_ical_resource_2rc doesn’t exist on my system.

The files that do exist in that directory are

agent_config_akonadi_contacts_resource_0
agent_config_akonadi_contacts_resource_0_changes.dat
agent_config_akonadi_ical_resource_0
agent_config_akonadi_ical_resource_0_changes.dat
agent_config_akonadi_ical_resource_2
agent_config_akonadi_ical_resource_2_changes.dat
agent_config_akonadi_ical_resource_4
agent_config_akonadi_ical_resource_4_changes.dat
agent_config_akonadi_indexing_agent
agent_config_akonadi_indexing_agent_changes.dat
agent_config_akonadi_maildir_resource_0
agent_config_akonadi_maildir_resource_0_changes.dat
agent_config_akonadi_maildispatcher_agent_changes.dat
agent_config_akonadi_migration_agent_changes.dat
agent_config_akonadi_newmailnotifier_agent_changes.dat
agentsrc
akonadiserverrc

of which agent_config_akonadi_ical_resource_2 seems to represent one of my 3 calendars.

cat of $HOME/.config/agent_config_akonadi_ical_resource_2 yields 2 lines

[Agent]
Name=Calender 1

These files in .config/akonadi/ are more about the server’s configuration, not the configurations of each connector/resource.

Those are directly in .config. Try running this:
$> find $HOME/.config -name "akonadi_*_resource_*rc"

find $HOME/.config -name "akonadi_*_resource_*rc" yields

/home/user/.config/akonadi_ical_resource_4rc
/home/user/.config/akonadi_ical_resource_0rc
/home/user/.config/akonadi_maildir_resource_0rc
/home/user/.config/akonadi_ical_resource_2rc
/home/user/.config/akonadi_contacts_resource_0rc

cat of /home/user/.config/akonadi_ical_resource_2rc

[General]
DisplayName=Calender 1
MonitorFile=false
Path[$e]=file:$HOME/.local/share/apps/korganizer/cal1.ics
UpdatePeriod=5

I’m assuming it’s worth a try to set UpdatePeriod to 0?

I am not sure if 0 will be considered valid or not.

Conceptually the value is the update interval in minutes, so theoretically you could try a really large value. (Maximum value for the data type is roughly 2 billion).

However it is weird that the value is even applied.

From what I can see in the code this value should only be used if the setting
PeriodicUpdate=true is present in the file.

Since it is absent its default should be false, i.e. “OFF”, but you could try making that explicit with
PeriodicUpdate=false

I wonder if it would not just be easier to “remove” the calendar and re-add it.