You are not logged in.

#1 2019-08-23 20:52:18

Registered: 2019-08-23
Posts: 2

New to Bunsenlabs, new to cron, --help

Hello everyone,,
first time here (and new to Bunsenlabs, coming from Mint [Cinnamon and Xfce editions])

I've just upgraded my netbook with an old SSD I had lying around (Intel 330, 60GB about 5TB of data already written on it) i couldn't stand the coffee machine sound of my HDD (WD Blue, 500GB)+ I switched from Mint 17.3 Xfce to Bunsenlabs (both to get a smaller / and smaller RAM footprint)

TL;DR: I'd need help performing TRIM via a cron jobenglish news capread

I am not new to linux (but new to cron), but I'm far more used to Android than linux debugging; consider me as standard end-user today.

I don't mind killing the SSD with some swapping, but why not trying not to kill it too soon...

So I've read quite a lot about SSD and Linux these last few days and two choices are in there: discard flag in fstab or trim triggered by either cron job or rc.local

rc.local choice isn't a good one as it slows down the boot quite a lot on my baby.

discard flag isn't recommended (or at least some say so)

Looks like only cron job is left?

I read about cron, but how many cron services exists? like 6?

I found crontab and such in /etc, it does have some lines already,

systemctl says cron.service is active and running

but neither me or root has any cron jobs running?

putting script in /etc/cron.hourly doesn't seem to do anything

Existing /etc/crontab content:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.


# m h dom mon dow user    command
17 *    * * *    root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
For now i run the trim job manually with the following:

date >> /home/matmutant/trim-output && sudo fstrim -v / >> /home/matmutant/trim-output

I'm pretty sure I've missed something while trying to learn, so if anyone could light my lantern with his Bunsen burner that would be great!

Thank you,

Last edited by Gabar (2019-09-16 14:19:48)


#2 2019-08-23 21:32:10

Registered: 2016-03-06
Posts: 143

Re: New to Bunsenlabs, new to cron, --help

I don't worry about any of that these days but it may be worthwhile enabling the systemd trim timer service.

Wait for the experts to reply though.


#3 2019-08-24 01:17:41

Registered: 2015-10-13
Posts: 87

Re: New to Bunsenlabs, new to cron, --help

The instructions offered by HOAS in the linked thread,
was valid for Debian Stretch. But if you have upgraded to Debian Buster, all you need to do is enable the systemd timer, which is now installed (but not enabled) by default for the fstrim service (no copying of files required). I.e.,

sudo systemctl enable fstrim.timer


Board footer

Powered by FluxBB