Ubuntu: How to reschedule mlocate

What is mlocate can be found here.

By default it is scheduled to execute daily – that might not meet your expectations what you computer should do when you power it up.

Here is how to reschedule it to execute weekly:

### In the terminal
sudo chmod -x /etc/cron.daily/mlocate
sudo cp /etc/cron.daily/mlocate /etc/cron.weekly/mlocate
sudo chmod +x /etc/cron.weekly/mlocate

This has been checked with Ubuntu 18.04 LTS.