So first we need to create a valve five minutes from now.
So let's use Echo Touch TMP test
val pipe at now plus five minutes.
What is that doing? Well, it runs it five minutes for now. Nice thing about AD is that
AD is very flexible regarding the time specification. Have a look at the man page if you want.
Then use the appropriate solution to run the fstrim command daily.
Well, that should be relatively easy.
First, don't need no sudo, but we need systemctl cat
on fstrim t timer and fstream timer. Oh, it's set
to weekly. Well, we need to change that to daily.
If you need some help about the timing options, then you might want to check
out the main page for systemd timer. That's a generic information about the timer configuration
which has lots of cool options. And systemd time has time specifications that you can
use. Well, in the case of this fstream timer, it should be obvious.
So I'm going to use sudo systemctl edit fstrim timer
that is opening my editor again and in there I'm
going to use the timer and I make that on
calendar is daily and I'm saving my changes. Save modified.
Yes, and that should do it for me.
So systemctl status on fstrim timer,
is that telling us anything?
Well, it's telling us that the timer is active and that it is waiting and
we really need to check what is going on in the timer itself to verify.
Now what else can we see in the systemd timer? We can see the trigger and the trigger is set
to 40 minutes left. So apparently my change has been applied and it's already scheduled to 40 minutes from now.
Last ensure that daily at 4pm the message hello is written to syslog as
whom? Well, the lab doesn't say so so let me use a crontab e
to do it. For my current user account that would be 016 logger.
Hello.
Now if you want to do something at 4pm, it's not enough
if you just change the second position. You cannot do 16 because
16 will run from 4.0pm until 4.59pm every single minute.
That's not what we want. We want to learn at 4pm sharp and then this is what you are going to use.
So get out of the Chrome tab editor and wait until 4pm to verify.