Systemd/timers/zh: Difference between revisions

Ardenet (talk | contribs)
Created page with "定时器是 systemd 中名称以 .timer 结尾的单元文件,用于控制 .service 文件或事件。定时器可以用作 <code>cron</code> 的替代方案。定时器内置对基于日历的事件和普通时间事件的支持,并且可以异步运行。"
Ardenet (talk | contribs)
Created page with "以下示例定时器每 5 分钟运行一次 systemd 单元以调用 bash 脚本。"
Tags: Mobile edit Mobile web edit
Line 4: Line 4:
<span id="Configuration"></span>
<span id="Configuration"></span>
== 配置 ==
== 配置 ==
<div lang="en" dir="ltr" class="mw-content-ltr">
以下示例定时器每 5 分钟运行一次 systemd 单元以调用 bash 脚本。
The following example timer runs a systemd unit every 5 minutes which invokes a bash script.
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
systemd.timers."hello-world" = {
systemd.timers."hello-world" = {