mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 12:45:59 +02:00
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
This commit is contained in:
parent
2a4379ceea
commit
2f03bc1362
4 changed files with 59 additions and 0 deletions
16
pages/common/at.md
Normal file
16
pages/common/at.md
Normal file
|
@ -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
pages/common/atq.md
Normal file
15
pages/common/atq.md
Normal file
|
@ -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
pages/common/atrm.md
Normal file
12
pages/common/atrm.md
Normal file
|
@ -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
pages/common/batch.md
Normal file
16
pages/common/batch.md
Normal file
|
@ -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`
|
Loading…
Add table
Reference in a new issue