service

how create a python service, executed when needed

how create a python service, executed when needed Question: I want to create a notification service, that will be used in diferent applications. But I would run it only sometimes. How I achieve this? I will try to use webhooks, informing my service to notify something basically, I don’t keep my service running. I would …

Total answers: 1

python time.sleep() doesn't work linux service

python time.sleep() doesn't work linux service Question: Hello I’m trying to make a linux ubuntu arm64 service in python. My problem is quite simple. I called the service ‘bob’ My code for the service is: import time for i in range(0,99999999): print("hello", i) time.sleep(5) Then in terminal: systemctl restart bob systemctl status bob What i …

Total answers: 1

How to exit cleanly from Flask and 'waitress' running as a Windows pywin32 service

How to exit cleanly from Flask and 'waitress' running as a Windows pywin32 service Question: I have managed to cobble together a working demo of a pywin32 Windows service running Flask inside the Pylons waitress WSGI server (below). A niece self contained solution is the idea… I have spent hours reviewing and testing ways of …

Total answers: 1

Salt Stack: using execution modules in SLS

Salt Stack: using execution modules in SLS Question: So far as I can see in the Salt documentation (e.g. here) there are two main types of modules supported: state modules and execution modules (I know there are also renderers, returners, and so on). Most of examples of SLS files contain statements related only to state …

Total answers: 1

Python script as linux service/daemon

Python script as linux service/daemon Question: Hallo, I’m trying to let a python script run as service (daemon) on (ubuntu) linux. On the web there exist several solutions like: http://pypi.python.org/pypi/python-daemon/ A well-behaved Unix daemon process is tricky to get right, but the required steps are much the same for every daemon program. A DaemonContext instance …

Total answers: 2

How to run a script in the background even after I logout SSH?

How to run a script in the background even after I logout SSH? Question: I have Python script bgservice.py and I want it to run all the time, because it is part of the web service I build. How can I make it run continuously even after I logout SSH? Asked By: zihaoyu || Source …

Total answers: 12