1
00:00:06,719 --> 00:00:09,910
So first we need to create
a valve five minutes from now.

2
00:00:11,269 --> 00:00:18,100
So let's use
Echo Touch TMP test

3
00:00:18,100 --> 00:00:24,929
val pipe at
now plus five minutes.

4
00:00:26,440 --> 00:00:31,460
What is that doing? Well, it runs it five
minutes for now. Nice thing about AD is that

5
00:00:31,460 --> 00:00:36,479
AD is very flexible regarding the time specification. Have
a look at the man page if you want.

6
00:00:37,520 --> 00:00:41,229
Then use the appropriate solution
to run the fstrim command daily.

7
00:00:41,850 --> 00:00:44,140
Well, that should
be relatively easy.

8
00:00:44,979 --> 00:00:49,689
First, don't need no sudo,
but we need systemctl cat

9
00:00:49,689 --> 00:00:54,399
on fstrim t timer and
fstream timer. Oh, it's set

10
00:00:54,399 --> 00:00:59,109
to weekly. Well, we need
to change that to daily.

11
00:01:00,009 --> 00:01:05,917
If you need some help about the
timing options, then you might want to check

12
00:01:05,917 --> 00:01:11,825
out the main page for systemd timer.
That's a generic information about the timer configuration

13
00:01:11,825 --> 00:01:17,732
which has lots of cool options. And
systemd time has time specifications that you can

14
00:01:17,732 --> 00:01:23,640
use. Well, in the case of
this fstream timer, it should be obvious.

15
00:01:23,700 --> 00:01:29,694
So I'm going to use
sudo systemctl edit fstrim timer

16
00:01:29,694 --> 00:01:35,688
that is opening my editor
again and in there I'm

17
00:01:35,688 --> 00:01:41,682
going to use the timer
and I make that on

18
00:01:41,682 --> 00:01:47,676
calendar is daily and I'm
saving my changes. Save modified.

19
00:01:47,676 --> 00:01:53,670
Yes, and that should
do it for me.

20
00:01:54,530 --> 00:01:58,474
So systemctl status
on fstrim timer,

21
00:01:58,474 --> 00:02:02,419
is that
telling us anything?

22
00:02:02,959 --> 00:02:08,884
Well, it's telling us that the timer
is active and that it is waiting and

23
00:02:08,884 --> 00:02:14,810
we really need to check what is
going on in the timer itself to verify.

24
00:02:15,419 --> 00:02:21,539
Now what else can we see in the systemd timer?
We can see the trigger and the trigger is set

25
00:02:21,539 --> 00:02:27,659
to 40 minutes left. So apparently my change has been
applied and it's already scheduled to 40 minutes from now.

26
00:02:29,060 --> 00:02:34,370
Last ensure that daily at 4pm the
message hello is written to syslog as

27
00:02:34,370 --> 00:02:39,680
whom? Well, the lab doesn't say so
so let me use a crontab e

28
00:02:39,680 --> 00:02:44,990
to do it. For my current
user account that would be 016 logger.

29
00:02:50,139 --> 00:02:50,460
Hello.

30
00:02:51,870 --> 00:02:57,693
Now if you want to do
something at 4pm, it's not enough

31
00:02:57,693 --> 00:03:03,516
if you just change the second
position. You cannot do 16 because

32
00:03:03,516 --> 00:03:09,340
16 will run from 4.0pm
until 4.59pm every single minute.

33
00:03:09,599 --> 00:03:14,439
That's not what we want. We want to learn at 4pm
sharp and then this is what you are going to use.

34
00:03:15,360 --> 00:03:20,650
So get out of the Chrome tab
editor and wait until 4pm to verify.
