Where to modify the frequency for systemd service "plocate-updatedb.timer"?

The title says it all. :slight_smile:

I want to change to only once a week, after first login if possible.

I found the primary reference (symbolic link)at:

  • /etc/systemd/system/timers.target.wants/plocate-updatedb.timer

and that points to

  • /lib/systemd/system/plocate-updatedb.timer

which has an associated file

  • /lib/systemd/system/plocate-updatedb.service

The "timer" file seems to have the parameters for controlling that:

[Unit]
Description=Update the plocate database daily

[Timer]
OnCalendar=daily
RandomizedDelaySec=12h
AccuracySec=20min
Persistent=true

[Install]
WantedBy=timers.target

So ... if I wanted to impose a different schedule, but wanted to specify that in a "local custom" config file, likely under "/etc" somewhere,

  • where would I do that ?         and
  • how would I do that ?

Would I be using

OnCalendar=weekly

instead of the daily value, or is there a different way of doing that?




If I wanted to completely disable that, do I use

systemctl disable plocate-updatedb.service

or, since that says it is triggered by the "timer", do I use

systemctl disable plocate-updatedb.timer

???

Also, would doing so actually "break" anything, any service ?

move /etc/cron.daily/plocate to /etc/cron.weekly/plocate

4 Likes

Thank you, Pavlos. I have moved that to the above.

So ... no need to concern myself with any of the systemd stuff ?

2 Likes

I would not be concerned about systemd ... the plocate script updates the db.

4 Likes