run cron every N seconds

Для современных систем есть systemd который прекрасно решает эту задачу оригинальная статься здесь


Here is a simple example that logs "Hello World" every 10 seconds:

Description=Say Hello
ExecStart=/usr/bin/logger -i Hello World

Description=Say Hello every 10 seconds

After setting up these units (in /etc/systemd/system, as described above, for a system-wide setting, or at ~/.config/systemd/user for a user-specific setup), you need to enable the timer (not the service though) by running systemctl enable helloworld.timer. If you want to start the timer immediately (instead of waiting for it to start after a reboot), also run systemctl start helloworld.timer.

Tags: ,
| 09/01/2020 | Posted in Без рубрики |

Leave a Reply