Confused on Steam Play and Proton? Be sure to check out our guide.
Unknown cron job?
Salvatos Feb 21, 2020
For a while now I’ve had something trigger at precisely 0:08:00 every single day and do a lot of disk reading and writing for close to ten minutes, slowing down my entire system in the process. At first I suspected Timeshift, but I have it set up to only fire once a week, and according to the available backups it’s not running every day and not specifically at that time. The weird thing is that System Monitor doesn’t seem to show any increased activity, but I can definitely hear it and feel it. Since it seems so similar to what Timeshift does, I’m not ruling out the possibility that it’s somehow running and not actually saving the backups, since it seems like a pretty shaky piece of software in general.

Anyway, I’d like to figure out what this is and turn it off but I have no idea where to look, so any help would be welcome. Running crontab as either my user or root returns nothing. I’m on Mint 19 Cinnamon.
WorMzy Feb 21, 2020
Also check in /etc/cron.d and systemd timers.
cat /etc/cron.d/*
systemctl list-timers
systemctl --user list-timers
Valck Feb 21, 2020
My first guess would be updatedb for your locate database, indexing your filesystems.
I personally find locate a very useful tool when you need it, just shift it to a time when you're less active, or maybe weekly or even monthly instead of daily...
Salvatos Feb 21, 2020
Quoting: WorMzyAlso check in /etc/cron.d and systemd timers.
cat /etc/cron.d/*
systemctl list-timers
systemctl --user list-timers

/etc/cron.d/* looks innocent:
30 7    * * *   root [ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=""

0 * * * * root timeshift --check --scripted


systemctl list-timers:
NEXT                         LEFT        LAST                         PASSED    
Fri 2020-02-21 18:03:54 EST  8min left   Fri 2020-02-21 17:00:11 EST  55min ago 
Fri 2020-02-21 18:34:22 EST  38min left  Fri 2020-02-21 09:53:17 EST  8h ago    
Sat 2020-02-22 03:33:17 EST  9h left     Fri 2020-02-21 14:43:13 EST  3h 12min a
Sat 2020-02-22 06:53:35 EST  12h left    Fri 2020-02-21 09:53:17 EST  8h ago    
Sat 2020-02-22 13:22:29 EST  19h left    Fri 2020-02-21 13:22:29 EST  4h 33min a
Mon 2020-02-24 00:00:00 EST  2 days left Mon 2020-02-17 00:00:11 EST  4 days ago
n/a                          n/a         Thu 2020-02-20 00:18:53 EST  1 day 17h 

The last one might correspond to the approximate time it finished two days ago, but the rest don’t seem related.

systemctl --user list-timers shows 0 timer.

I also tried grep run-parts /etc/crontab to check mlocate and other dailies but the timing doesn’t correspond either.
17 * * * * root    cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Valck Feb 22, 2020
Quoting: Salvatos
Quoting: WorMzyAlso check in /etc/cron.d and systemd timers.
[code]cat /etc/cron.d/*
I suppose you also looked inside the other /etc/cron.* directories--if they exist of course? On my system, there's /etc/cron.daily/mlocate for example, as well as other stuff in /etc/cron.weekly/ and so on.
Can't help you with systemd specifics though.
Salvatos Feb 22, 2020
I installed iotop and it’s definitely updatedb.mlocate using up 90+% of IO.

I ran locate / as suggested on Launchpad to see where it was spending so much time, and as it happens Timeshift’s snapshots are occupying an incredible proportion of the output. I’ve added its directory to PRUNEPATHS in /etc/updatedb.conf as suggested, we’ll see how it goes the next time.

Last edited by Salvatos on 22 February 2020 at 5:25 am UTC
Salvatos Feb 22, 2020
Quoting: Valck
Quoting: Salvatos
Quoting: WorMzyAlso check in /etc/cron.d and systemd timers.
[code]cat /etc/cron.d/*
I suppose you also looked inside the other /etc/cron.* directories--if they exist of course? On my system, there's /etc/cron.daily/mlocate for example, as well as other stuff in /etc/cron.weekly/ and so on.
Can't help you with systemd specifics though.
I looked at the file but it didn’t say anything about when it runs, and my understanding of the grep run-parts /etc/crontab output above was that mlocate and other dailies are supposed to run at 6:25. I’m guessing it catches up later when the computer isn’t on at that time, but I wonder why it consistently chooses to do so at 0:08.
Salvatos Feb 24, 2020
Aaaand it took about a minute tonight. Case closed, thank you all for the assist :)
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.

Buy Games
Buy games with our affiliate / partner links: