diff --git a/pages/common/at.md b/pages/common/at.md new file mode 100644 index 0000000000..74b2f08c32 --- /dev/null +++ b/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` diff --git a/pages/common/atq.md b/pages/common/atq.md new file mode 100644 index 0000000000..4b993a4472 --- /dev/null +++ b/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` diff --git a/pages/common/atrm.md b/pages/common/atrm.md new file mode 100644 index 0000000000..f874220c90 --- /dev/null +++ b/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}}` diff --git a/pages/common/batch.md b/pages/common/batch.md new file mode 100644 index 0000000000..d290f2150b --- /dev/null +++ b/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`