mtakaki / cachet-url-monitor

URL monitor plugin for cachethq.io
MIT License
125 stars 49 forks source link

How to run this in the background? #54

Closed wnukadrian closed 5 years ago

wnukadrian commented 5 years ago

Hello,

How to run this in the background? I want to update often http websites?

"python cachet_url_monitor/scheduler.py config.yml"

I have server with Debian 9.5 Stretch.

mtakaki commented 5 years ago

I would recommend you using docker for this, instead of running like this. But if you really want to run it without docker, you can just execute it in the background:

python cachet_url_monitor/scheduler.py config.yml &

But how you gonna monitor the process? The moment you close the shell, the process will be killed too. You could use screen and keep the process up, but now you have to deal with servers restarts, server shutdown, etc. You can also use nohup or create a service, but now it's more effort than installing docker in your server.

psudoorg commented 5 years ago

@mtakaki - thanks for this. I think it solved my issue; although, I'm not sure if I'm using it right - sudo nohup python cachet_url_monitor/scheduler.py config.yml I believe this command expects an "output" file too but given that I've not specified any, it makes one automatically!

mtakaki commented 5 years ago

@psudoorg that looks about right, but if I were you I would just run it with docker.

mtakaki commented 5 years ago

I'm closing this ticket, but please feel free to reopen it if you still have any question.