wiki/_next/data/Ie9t5zutrXP6Of75Cb5xF/linux.systemd.timers.json

1 line
9.2 KiB
JSON
Raw Permalink Normal View History

2022-07-29 15:41:17 +00:00
{"pageProps":{"metadata":{"date":"2021-07-19 21:45:47 +08:00","date_modified":"2022-05-22 22:28:49 +08:00","language":"en","source":""},"title":"systemd timers","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"timer-management"},"children":[{"type":"text","value":"Timer management"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/linux.systemd.timers#timer-management"},"children":[{"type":"text","value":"Timer management"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"timedate-formats"},"children":[{"type":"text","value":"Timedate formats"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/linux.systemd.timers#timedate-formats"},"children":[{"type":"text","value":"Timedate formats"}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can schedule tasks with timers.\nIf systemd is compiled with the feature, it makes cron unnecessary.\n"}]},{"type":"element","tagName":"h1","properties":{"id":"timer-management"},"children":[{"type":"text","value":"Timer management"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In a fully-installed systemd-enabled system, there are multiple ways to manage your timers.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"While managing them is practically the same as any other units (see "},{"type":"element","tagName":"a","properties":{"href":"/linux.systemd"},"children":[{"type":"text","value":"systemd"}]},{"type":"text","value":"), there are timer-specific ways to manage them easier.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"systemctl list-timers"}]},{"type":"text","value":" is the go-to command that displays an overview of all active timers.\n Just give the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"--all"}]},{"type":"text","value":" flag to list all timers including disabled timers.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"systemctl status ${TIMER_UNIT}"}]},{"type":"text","value":" is another way for a specific timer unit.\n It gives the same details as the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"list-timers"}]},{"type":"text","value":" subcommand so you'll rarely use this subcommand in practice.\n"}]}]}]},{"type":"element","tagName":"h1","properties":{"id":"timedate-formats"},"children":[{"type":"text","value":"Timedate formats"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"systemd has different ways to denote time.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Timespans denote the duration — e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"100 seconds"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{"classNa