Вы должны создать три новых файла юнитов, примерно такие (непроверенные):
mything.service
:
[Unit]
Description=My custom thingy
[Service]
Type=service
ExecStart=/path/to/activate.sh
ExecStop=/path/to/deactivate.sh
[Install]
WantedBy=multi-user.target
Wants=togglemything.timer
togglemything.timer
:
[Unit]
Description=My custom timer thingy
[Timer]
OnCalendar=hourly
togglemything.service
:
[Unit]
Description=Toggle my custom thing
[Service]
Type=oneshot
ExecStart=/path/to/toggle.sh
Последние два должны иметь одно и то же имя перед точкой, иначе таймер ничего не сделает.
Вам нужно всего лишь выполнить systemctl start mything
, чтобы начать работу.