Setup a python script as a service through systemctl/systemd
<p>There are several ways you can run your program as a background service in Linux such as <strong>crontab, .bashrc, </strong>etc but today I’ll write about systemd. I was initially looking for a way to run my python script as a background service so even if the server restarts for some reason, my script will run in the background regardless and I found that systemd allows me to do that. Let’s get started</p>
<p>I’ll be setting this up on an <strong>Ubuntu 18.10 </strong>machine.</p>
<p>Almost all versions of Linux come with <strong>systemd</strong> out of the box, but if your’s didn’t come with it then you can simply run the following command:</p>
<p><a href="https://medium.com/codex/setup-a-python-script-as-a-service-through-systemctl-systemd-f0cc55a42267"><strong>Click Here</strong></a></p>