aboutsummaryrefslogtreecommitdiff
path: root/course/chapters/07-automation.json
diff options
context:
space:
mode:
Diffstat (limited to 'course/chapters/07-automation.json')
-rw-r--r--course/chapters/07-automation.json134
1 files changed, 134 insertions, 0 deletions
diff --git a/course/chapters/07-automation.json b/course/chapters/07-automation.json
new file mode 100644
index 0000000..3345fc2
--- /dev/null
+++ b/course/chapters/07-automation.json
@@ -0,0 +1,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"
+ ]
+ }
+ ]
+} \ No newline at end of file