Prechádzať zdrojové kódy

at: add page, atq: add page, atrm: add page, and batch: add page (#1344)

commands to queue commands execution at specified time
or when system load allows
Moti Korets 7 rokov pred
rodič
commit
2f03bc1362
4 zmenil súbory, kde vykonal 59 pridanie a 0 odobranie
  1. 16 0
      pages/common/at.md
  2. 15 0
      pages/common/atq.md
  3. 12 0
      pages/common/atrm.md
  4. 16 0
      pages/common/batch.md

+ 16 - 0
pages/common/at.md

@@ -0,0 +1,16 @@
+# at
+
+> Execute commands once at a later time.
+> Service atd (or atrun) should be running for the actual executions.
+
+- Execute commands from standard input in 5 minutes (press `Ctrl + D` after entering commands):
+
+`at now + 5 min`
+
+- Execute a command from standard input at 10:00 AM today:
+
+`echo "{{./make_db_backup.sh}}" | at 1000`
+
+- Execute commands from a given file next Tuesday:
+
+`at -f {{path/to/file}} 9:30 PM Tue`

+ 15 - 0
pages/common/atq.md

@@ -0,0 +1,15 @@
+# atq
+
+> Show jobs scheduled by `at` or `batch` commands.
+
+- Show the current user's scheduled jobs:
+
+`atq`
+
+- Show jobs from queue named 'a' (queues have single-character names):
+
+`atq -q {{a}}`
+
+- Show jobs of all users (run as super user):
+
+`sudo atq`

+ 12 - 0
pages/common/atrm.md

@@ -0,0 +1,12 @@
+# atrm
+
+> Remove jobs scheduled by `at` or `batch` commands.
+> To find job numbers use `atq`.
+
+- Remove job number 10:
+
+`atrm {{10}}`
+
+- Remove many jobs, separated by spaces:
+
+`atrm {{15}} {{17}} {{22}}`

+ 16 - 0
pages/common/batch.md

@@ -0,0 +1,16 @@
+# batch
+
+> Execute commands at a later time when the system load levels permit.
+> Service atd (or atrun) should be running for the actual executions.
+
+- Execute a command from standard input:
+
+`echo "{{./make_db_backup.sh}}" | batch`
+
+- Execute commands from a given file:
+
+`batch -f {{path/to/file}}`
+
+- Execute commands from standard input (press `Ctrl + D` when finished):
+
+`batch`