- Okay, so at five minutes from now.
I'm just trying, at is very intuitive.
And oh, that doesn't work.
Last token seen minutes, garbled time.
Man at, can we do anything like five minutes from now?
Oh, there we go.
You see, you can also give times
like now plus count time units.
That's good.
So now plus five min, something like that.
So take two.
At now plus five min.
Is that going to work?
Yeah, that seems to be working.
What do we need to do?
Touch/TMP/testfile.
And Control + D.
And there we can see the job five
is scheduled for execution at 10:30.
All right, second part of this lab was to make sure
that fstrim learns on a daily basis.
I would say sudo systemCTL edits fstrim.timer.
And now we can see on calendar
is weekly in the timer section.
Well, then I'm pretty sure that
if we add timer and we make it on calendar is daily,
it should be doing it.
Save modified.
Yes, I wanna save it.
And there we go.
So let's verify sudo systemCTL cat fstrim.timer.
And I'm verifying that the override file has been created.
So there we can see the override file
is specifying that the timer
should be executed on calendar is daily.
Hey, but here we have on calendar is weekly.
Yes, but the thing is that in general,
in Linux the more specific configuration
will always win from the more generic configuration.
So you can count on it.
This will be executed on a daily basis.
And then, the last one.
Ensure that on a daily basis at 4:00 PM,
the message hello is written to the log file.
So I would say sudo crontab minus E,
which is opening a crontab for the root user.
Now 4:00 PM, what you should not do is this.
This looks all right, but this is going to execute
every minute at hour 16.
You don't want it every minute.
You want it on top of the hour.
So at minute zero, hour 16, every day of the month,
every month and every week.
We are going to use logger hello.
And that should do it.
So let me get out of there.
And that is installing the new crontab.
And now, well, it's 10:28
so let's wait for five and a half more hours
to verify if this is working or not.
If you want to test something
in crontab, then I would say,
test something to be scheduled two minutes from now,
verify that and then the 4:00 PM one
should be working as well.
That's all for this lab solution.