O
O
onlooked2016-02-28 17:56:42
Python
onlooked, 2016-02-28 17:56:42

Running python3 script on hosting?

Hello. There is hosting. Python is supported. So how can you run a script on it? The script will be with the API. It is necessary that the script can be installed and exited from the hosting, not follow it. Will do the job within 30 minutes.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton Konovalov, 2016-02-29
@onlooked

In addition to cron and daemonization, there is another simple solution. If you are sure that the server will run smoothly - you can simply use nohup:
> nohup python my_script.py > my_script.out &

T
Tirael78, 2016-02-28
@Tirael78

one-time execution - cron
if you need to work as a service - supervisord or systemd, the second is more difficult, but much more efficient

S
Stas Kross, 2016-02-28
@BrainRTP

First go to the script directory. Example:
cd /home
Then write this:
python NAME.py
Example:
1) cd /home
2) python test.py

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question