Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 597 Bytes

linux-service.md

File metadata and controls

28 lines (18 loc) · 597 Bytes

Run as service on Debian based distro

Using systemd

⚠️ Make sure to follow the instructions to install from binary before.

Run the below command in a terminal:

sudo vim /etc/systemd/system/swarm-cronjob.service

Copy the sample swarm-cronjob.service.

Change the user, group, and other required startup values following your needs.

Enable and start swarm-cronjob at boot:

sudo systemctl enable swarm-cronjob
sudo systemctl start swarm-cronjob

To view logs:

journalctl -fu swarm-cronjob.service