From 695a88c7e40719e4befe2b3a5559822fe3043b8d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 20 Dec 2019 19:46:03 +0100 Subject: task-scheduler: rewrite with new cfgcmd syntax --- docs/system/serial-console.rst | 4 +-- docs/system/task-scheduler.rst | 70 +++++++++++++++--------------------------- 2 files changed, 27 insertions(+), 47 deletions(-) (limited to 'docs/system') diff --git a/docs/system/serial-console.rst b/docs/system/serial-console.rst index 53322f53..cd27fa21 100644 --- a/docs/system/serial-console.rst +++ b/docs/system/serial-console.rst @@ -38,9 +38,9 @@ Major upgrades to the installed distribution may also require console access. * ``57600`` - 57,600 bps * ``115200`` - 115,200 bps (default for serial console) -############## +############### Network Console -############## +############### TBD. diff --git a/docs/system/task-scheduler.rst b/docs/system/task-scheduler.rst index 7fe49988..869a0600 100644 --- a/docs/system/task-scheduler.rst +++ b/docs/system/task-scheduler.rst @@ -1,60 +1,40 @@ .. _task-scheduler: +############## +Task Scheduler +############## -Task scheduler --------------- +The task scheduler allows you to execute tasks on a given schedule. It makes +use of UNIX cron_. -| Task scheduler — allows scheduled task execution. Note that scripts excecuted this way are executed as root user - this may be dangerous. -| Together with :ref:`commandscripting` this can be used for automating configuration. +.. note:: All scripts excecuted this way are executed as root user - this may + be dangerous. Together with :ref:`command-scripting` this can be used for + automating (re-)configuration. -.. code-block:: none +.. cfgcmd:: set system task-scheduler task '' interval '' - system - task-scheduler - task - cron-spec - executable - arguments - path - interval - [mhd] + Specify the time interval when `` should be executed. The interval + is specified as number with one of the following suffixes: -Interval -******** + * ``none`` - Execution interval in minutes + * ``m`` - Execution interval in minutes + * ``h`` - Execution interval in hours + * ``d`` - Execution interval in days -You are able to set the time as an time interval. + .. note:: If suffix is omitted, minutes are implied. -.. code-block:: none +.. cfgcmd:: set system task-scheduler task '' crontab-spec '' - set system task-scheduler task interval + Set execution time in common cron_ time format. A cron `` of + ``30 */6 * * *`` would execute the `` at minute 30 past every 6th hour. -Sets the task to execute every N minutes, hours, or days. Suffixes: +.. cfgcmd:: set system task-scheduler task '' executable path '' - * m — minutes - * h — hours - * d — days + Specify absolute `` to script which will be run when `` is + executed. -If suffix is omitted, minutes are implied. +.. cfgcmd:: set system task-scheduler task '' executable arguments '' -Or set the execution time in common cron time. + Arguments which will be passed to the executable. -.. code-block:: none - - set system task-scheduler task TEST crontab-spec "* * * 1 *" - -Example -******* - -.. code-block:: none - - system - task-scheduler - task mytask - interval 2h - executable - path /config/scripts/mytask - arguments "arg1 arg2 arg3" - task anothertask - cron-spec "* * * 1 *" - executable - path /config/scripts/anothertask \ No newline at end of file +.. _cron: https://en.wikipedia.org/wiki/Cron -- cgit v1.2.3