From 9d2d2147ce1cdec4aaa46186236bc4e451946e74 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:08:23 +0300 Subject: [PATCH] at, batch: update pages (#14220) Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages/common/at.md | 14 +++++++++++--- pages/common/batch.md | 16 +++------------- pages/linux/at.md | 20 -------------------- 3 files changed, 14 insertions(+), 36 deletions(-) delete mode 100644 pages/linux/at.md diff --git a/pages/common/at.md b/pages/common/at.md index 8255ba4430..3b5f0b3b72 100644 --- a/pages/common/at.md +++ b/pages/common/at.md @@ -1,16 +1,24 @@ # at > Execute commands once at a later time. -> Service atd (or atrun) should be running for the actual executions. +> Results will be sent to the users mail. > More information: . -- Execute commands from `stdin` in 5 minutes (press `Ctrl + D` when done): +- Start the `atd` daemon: + +`systemctl start atd` + +- Create commands interactively and execute them in 5 minutes (press ` + D` when done): `at now + 5 minutes` +- Create commands interactively and execute them at a specific time: + +`at {{hh:mm}}` + - Execute a command from `stdin` at 10:00 AM today: -`echo "{{./make_db_backup.sh}}" | at 1000` +`echo "{{command}}" | at 1000` - Execute commands from a given file next Tuesday: diff --git a/pages/common/batch.md b/pages/common/batch.md index 08c6d3ae46..cc14819ee8 100644 --- a/pages/common/batch.md +++ b/pages/common/batch.md @@ -1,17 +1,7 @@ # batch -> Execute commands at a later time when the system load levels permit. -> Service atd (or atrun) should be running for the actual executions. -> More information: . +> This command is an alias of `at`. -- Execute commands from `stdin` (press `Ctrl + D` when done): +- View documentation for the original command: -`batch` - -- Execute a command from `stdin`: - -`echo "{{./make_db_backup.sh}}" | batch` - -- Execute commands from a given [f]ile: - -`batch -f {{path/to/file}}` +`tldr at` diff --git a/pages/linux/at.md b/pages/linux/at.md deleted file mode 100644 index 8ea4215c2d..0000000000 --- a/pages/linux/at.md +++ /dev/null @@ -1,20 +0,0 @@ -# at - -> Executes commands at a specified time. -> More information: . - -- Open an `at` prompt to create a new set of scheduled commands, press `Ctrl + D` to save and exit: - -`at {{hh:mm}}` - -- Execute the commands and email the result using a local mailing program such as Sendmail: - -`at {{hh:mm}} -m` - -- Execute a script at the given time: - -`at {{hh:mm}} -f {{path/to/file}}` - -- Display a system notification at 11pm on February 18th: - -`echo "notify-send '{{Wake up!}}'" | at {{11pm}} {{Feb 18}}`