1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
{
"id": "07-automation",
"title": "Automation",
"icon": "⚙",
"level": "advanced",
"lessons": [
{
"id": "7.1",
"title": "Schedule commands with cron",
"objective": "Run a command on an interval and manage the schedule.",
"minutes": 8,
"commands": [
"cron-every",
"cron-list",
"cron-stop",
"cron-clear"
],
"blocks": [
{
"type": "text",
"text": "`cron-every` schedules a command inside the terminal (minimum 5 seconds). Jobs live only while the tab is open."
},
{
"type": "cmd",
"text": "cron-every 60 echo hello"
},
{
"type": "cmd",
"text": "cron-list"
},
{
"type": "cmd",
"text": "cron-stop 1"
},
{
"type": "cmd",
"text": "cron-clear"
},
{
"type": "tip",
"text": "For server-side schedules use Hermes cron; the terminal scheduler is per-tab."
}
],
"exercise": {
"instruction": "List active cron jobs.",
"accept": [
"cron-list"
],
"check": {
"type": "command"
},
"hint": "Type: cron-list"
},
"quiz": {
"q": "How long does a terminal cron job live?",
"options": [
"forever on the server",
"while the tab is open",
"until reboot"
],
"answer": 1
},
"sources": [
"modules/ext/cron.js"
]
},
{
"id": "7.2",
"title": "Kanban and checkpoints",
"objective": "Track work on a board and snapshot the VFS before risky changes.",
"minutes": 8,
"commands": [
"kanban",
"checkpoint",
"checkpoint-list",
"rollback"
],
"blocks": [
{
"type": "text",
"text": "`kanban` is a local board with todo/doing/done columns. `checkpoint` snapshots the VFS; `rollback` restores it."
},
{
"type": "cmd",
"text": "kanban add \"Try the course\""
},
{
"type": "cmd",
"text": "kanban list"
},
{
"type": "cmd",
"text": "checkpoint before-project"
},
{
"type": "cmd",
"text": "checkpoint-list"
},
{
"type": "cmd",
"text": "rollback before-project"
},
{
"type": "warn",
"text": "`rollback` replaces current VFS state — checkpoint before experiments."
}
],
"exercise": {
"instruction": "Create a checkpoint.",
"accept": [
"checkpoint *",
"checkpoint"
],
"check": {
"type": "command"
},
"hint": "Type: checkpoint my-test"
},
"quiz": {
"q": "What does checkpoint do?",
"options": [
"snapshots the VFS",
"deletes files",
"pushes to WebDAV"
],
"answer": 0
},
"sources": [
"modules/ext/kanban.js",
"modules/core/module-fs.js"
]
}
]
}
|