1

I have got samsung SSD and so TRIM is on automatically.

However I am bit confusing about how TRIM cron weekly starts.

According to cat /etc/crontab it says that CRON weekly will start at 6:47am (odd as I won't have computer on at that time)

However according to syslog the cron weekly began at 22:44.

I am confused as how CRON weekly job get started and at what times? Why does it say 6.47am but then runs at 22:44?

Thank you

Also would it work if I move fstrim from cron.weekly to cron.daily folder without doing anything else and then it would do fstrim daily?

1 Answer 1

1

I'm no expert, but maybe this will help. There are two different times used by linux, UTC and your local time based on your time zone. UTC is the same for everyone, local times change with location. When setting times, make sure you know how the program will interpret the time you are giving it.

When I set repetitive tasks, I like to set the crontab myself with the editor rather than changing the daily or weekly folders. From the terminal, type:

 sudo crontab -e 

And add your commands to this table directly. This way, all of the user's repetitive commands are held in one place. The default file contains instructions on how to make an entry, but the manpages for crontab have a more in depth description. You are editing it with nano, so make sure you get the hang of this as well.

2
  • Ah I see thanks. So if my computer wasn't on at that time would cron attempt the job again later on?
    – jonty789
    Oct 10, 2014 at 22:09
  • Depends how the cronjob is configured. Anacron will queue cronjobs and run them later, the crontab method I described will not. For TRIM don't sweat it. I just set my PC-use systems to run trim at power up (rc.local), and use a crontab like I described for a system thats mostly on, like a server. Missing a few days of TRIM is not going to affect anything, just possibly slow down a write-heavy app.
    – Dick M
    Oct 10, 2014 at 22:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .