1 00:00:06,870 --> 00:00:10,830 - Okay, so at five minutes from now. 2 00:00:10,830 --> 00:00:13,560 I'm just trying, at is very intuitive. 3 00:00:13,560 --> 00:00:15,630 And oh, that doesn't work. 4 00:00:15,630 --> 00:00:19,050 Last token seen minutes, garbled time. 5 00:00:19,050 --> 00:00:24,050 Man at, can we do anything like five minutes from now? 6 00:00:24,270 --> 00:00:25,103 Oh, there we go. 7 00:00:25,103 --> 00:00:27,060 You see, you can also give times 8 00:00:27,060 --> 00:00:31,590 like now plus count time units. 9 00:00:31,590 --> 00:00:32,423 That's good. 10 00:00:32,423 --> 00:00:37,080 So now plus five min, something like that. 11 00:00:37,080 --> 00:00:38,250 So take two. 12 00:00:38,250 --> 00:00:41,490 At now plus five min. 13 00:00:41,490 --> 00:00:42,540 Is that going to work? 14 00:00:42,540 --> 00:00:44,700 Yeah, that seems to be working. 15 00:00:44,700 --> 00:00:46,230 What do we need to do? 16 00:00:46,230 --> 00:00:49,173 Touch/TMP/testfile. 17 00:00:50,070 --> 00:00:51,600 And Control + D. 18 00:00:51,600 --> 00:00:53,070 And there we can see the job five 19 00:00:53,070 --> 00:00:55,890 is scheduled for execution at 10:30. 20 00:00:55,890 --> 00:00:59,430 All right, second part of this lab was to make sure 21 00:00:59,430 --> 00:01:02,640 that fstrim learns on a daily basis. 22 00:01:02,640 --> 00:01:07,523 I would say sudo systemCTL edits fstrim.timer. 23 00:01:09,270 --> 00:01:11,400 And now we can see on calendar 24 00:01:11,400 --> 00:01:13,530 is weekly in the timer section. 25 00:01:13,530 --> 00:01:15,660 Well, then I'm pretty sure that 26 00:01:15,660 --> 00:01:20,660 if we add timer and we make it on calendar is daily, 27 00:01:24,780 --> 00:01:25,923 it should be doing it. 28 00:01:27,210 --> 00:01:28,350 Save modified. 29 00:01:28,350 --> 00:01:30,360 Yes, I wanna save it. 30 00:01:30,360 --> 00:01:31,740 And there we go. 31 00:01:31,740 --> 00:01:36,740 So let's verify sudo systemCTL cat fstrim.timer. 32 00:01:39,510 --> 00:01:43,440 And I'm verifying that the override file has been created. 33 00:01:43,440 --> 00:01:45,360 So there we can see the override file 34 00:01:45,360 --> 00:01:46,780 is specifying that the timer 35 00:01:47,730 --> 00:01:50,490 should be executed on calendar is daily. 36 00:01:50,490 --> 00:01:52,980 Hey, but here we have on calendar is weekly. 37 00:01:52,980 --> 00:01:55,680 Yes, but the thing is that in general, 38 00:01:55,680 --> 00:01:58,530 in Linux the more specific configuration 39 00:01:58,530 --> 00:02:01,830 will always win from the more generic configuration. 40 00:02:01,830 --> 00:02:03,240 So you can count on it. 41 00:02:03,240 --> 00:02:06,153 This will be executed on a daily basis. 42 00:02:07,470 --> 00:02:08,760 And then, the last one. 43 00:02:08,760 --> 00:02:11,550 Ensure that on a daily basis at 4:00 PM, 44 00:02:11,550 --> 00:02:14,370 the message hello is written to the log file. 45 00:02:14,370 --> 00:02:19,353 So I would say sudo crontab minus E, 46 00:02:20,610 --> 00:02:24,210 which is opening a crontab for the root user. 47 00:02:24,210 --> 00:02:27,783 Now 4:00 PM, what you should not do is this. 48 00:02:29,238 --> 00:02:32,820 This looks all right, but this is going to execute 49 00:02:32,820 --> 00:02:35,190 every minute at hour 16. 50 00:02:35,190 --> 00:02:36,930 You don't want it every minute. 51 00:02:36,930 --> 00:02:38,790 You want it on top of the hour. 52 00:02:38,790 --> 00:02:42,060 So at minute zero, hour 16, every day of the month, 53 00:02:42,060 --> 00:02:43,500 every month and every week. 54 00:02:43,500 --> 00:02:47,190 We are going to use logger hello. 55 00:02:47,190 --> 00:02:48,240 And that should do it. 56 00:02:48,240 --> 00:02:50,160 So let me get out of there. 57 00:02:50,160 --> 00:02:52,680 And that is installing the new crontab. 58 00:02:52,680 --> 00:02:55,140 And now, well, it's 10:28 59 00:02:55,140 --> 00:02:58,590 so let's wait for five and a half more hours 60 00:02:58,590 --> 00:03:00,843 to verify if this is working or not. 61 00:03:01,800 --> 00:03:03,180 If you want to test something 62 00:03:03,180 --> 00:03:05,490 in crontab, then I would say, 63 00:03:05,490 --> 00:03:08,670 test something to be scheduled two minutes from now, 64 00:03:08,670 --> 00:03:11,370 verify that and then the 4:00 PM one 65 00:03:11,370 --> 00:03:12,870 should be working as well. 66 00:03:12,870 --> 00:03:14,553 That's all for this lab solution.