1 00:00:06,540 --> 00:00:07,410 - All right. 2 00:00:07,410 --> 00:00:08,857 Let's talk about at. 3 00:00:08,857 --> 00:00:11,220 At means the at daemon. 4 00:00:11,220 --> 00:00:15,150 So sudo systemctl status of atd 5 00:00:15,150 --> 00:00:18,360 is showing that atd is active and running. 6 00:00:18,360 --> 00:00:19,517 That's good. 7 00:00:19,517 --> 00:00:23,850 So as an ordinary user, I am going to open at teatime 8 00:00:23,850 --> 00:00:27,090 and there we are opening the at shell 9 00:00:27,090 --> 00:00:31,770 and in there I'm going to use logger TEATIME, 10 00:00:31,770 --> 00:00:33,780 and then I'm done. 11 00:00:33,780 --> 00:00:35,910 Now, this is also particular about at. 12 00:00:35,910 --> 00:00:38,070 You need to use control D. 13 00:00:38,070 --> 00:00:41,493 Control D is the end of file sign. 14 00:00:42,330 --> 00:00:47,010 That is what you can use to close editor-like things 15 00:00:47,010 --> 00:00:49,290 or secondary cells, Control D. 16 00:00:49,290 --> 00:00:52,440 We haven't seen control D very often, so far. 17 00:00:52,440 --> 00:00:57,240 And there, you can see that at TEATIME stands for 16:00:00. 18 00:00:57,240 --> 00:01:00,323 Of course you can also use real time, 19 00:01:00,323 --> 00:01:04,951 at 10:20 for instance. 20 00:01:04,951 --> 00:01:07,034 wall COFFEETIME, 21 00:01:08,640 --> 00:01:11,850 wall is Linux commanded to writes to all users 22 00:01:11,850 --> 00:01:13,620 that are currently logged in, 23 00:01:13,620 --> 00:01:15,540 and oops this is not doing what I wanted. 24 00:01:15,540 --> 00:01:19,413 So I need to repeat it at 20:21. 25 00:01:20,430 --> 00:01:21,990 Let me do this real fast 26 00:01:21,990 --> 00:01:24,570 because otherwise I will be too slow again. 27 00:01:24,570 --> 00:01:25,403 Okay. 28 00:01:25,403 --> 00:01:28,620 Typo in coffee, who cares about typo in coffee? 29 00:01:28,620 --> 00:01:31,830 What I care about is that I want to see 30 00:01:31,830 --> 00:01:33,330 that this is working. 31 00:01:33,330 --> 00:01:36,840 Wall by the way is for write all, 32 00:01:36,840 --> 00:01:39,870 and write all will write to all the users 33 00:01:39,870 --> 00:01:43,590 that currently have a terminal session open. 34 00:01:43,590 --> 00:01:46,560 It might not work because of security restrictions. 35 00:01:46,560 --> 00:01:50,580 In the old days, wall was a nice way to pass messages 36 00:01:50,580 --> 00:01:53,820 to all users currently connected to a system. 37 00:01:53,820 --> 00:01:57,360 Nowadays, security might be preventing this. 38 00:01:57,360 --> 00:02:01,980 Atq, atq is showing us what exactly 39 00:02:01,980 --> 00:02:04,260 is scheduled for execution 40 00:02:04,260 --> 00:02:05,460 and the interesting thing here 41 00:02:05,460 --> 00:02:07,890 is that we don't see the 10:20 anymore, 42 00:02:07,890 --> 00:02:12,210 but we do see the 10:21. 43 00:02:12,210 --> 00:02:17,210 And yeah, as I mentioned the wall is not so very successful 44 00:02:17,790 --> 00:02:18,990 but that's a wall problem, 45 00:02:18,990 --> 00:02:20,580 that's not an f problem. 46 00:02:20,580 --> 00:02:25,530 Atq is showing that the 10:21 job has been executed anyway. 47 00:02:25,530 --> 00:02:27,960 You wanna see a convincing example, okay. 48 00:02:27,960 --> 00:02:32,960 Then, at 10:22 touch /tmp/1022, 49 00:02:36,630 --> 00:02:37,590 control D, 50 00:02:37,590 --> 00:02:39,720 and there we will see in a couple of seconds 51 00:02:39,720 --> 00:02:41,790 that this is running. 52 00:02:41,790 --> 00:02:45,060 Atq for at query is showing 53 00:02:45,060 --> 00:02:47,370 that the job is waiting for execution. 54 00:02:47,370 --> 00:02:48,240 Let me use at rm. 55 00:02:48,240 --> 00:02:51,840 Atrm is what you can use to remove a job 56 00:02:51,840 --> 00:02:53,430 if you don't want it anymore. 57 00:02:53,430 --> 00:02:58,200 So atrm 1 makes that the job should now be gone. 58 00:02:58,200 --> 00:02:59,033 Is it? 59 00:02:59,033 --> 00:02:59,940 Yes, it is. 60 00:02:59,940 --> 00:03:02,850 So the only thing we need to do now is to wait 61 00:03:02,850 --> 00:03:05,073 until it is 10:22. 62 00:03:07,590 --> 00:03:08,423 There we go. 63 00:03:08,423 --> 00:03:13,203 It is 10:22 and ls -l on tmp. 64 00:03:15,030 --> 00:03:17,520 We can see file with the name 10:22. 65 00:03:17,520 --> 00:03:20,070 It has been created at 10:22. 66 00:03:20,070 --> 00:03:21,963 So that is how you can use at. 67 00:03:23,340 --> 00:03:26,940 At is useful but it is connected to a current, 68 00:03:26,940 --> 00:03:29,430 a current terminal session 69 00:03:29,430 --> 00:03:31,920 and that might limit it a little bit 70 00:03:31,920 --> 00:03:33,098 in what you want to do 71 00:03:33,098 --> 00:03:36,993 but it can be useful in particular for individual user jobs.