I have a python script written in pycharm that takes an input s = input("No. of hours to wait before beginning crawl: ")
, sleeps for that many hours and then crawls data from my website every 24 hours and writing/updating it in .csv files, within a folder it has created. That's all the script does. Now, I would like to run this script on the shared server which hosts my website. The server guy has given me the login credentials and told me to use putty for ssh access. I am an idiot at server and stuff, and barely learned python for this crawler(still learning). I tried looking online on how to do this, but realized I don't even know what I actually need to look for. So here I am, how do I run the .py file on the server, a basic guideline will do! Are there any changes that need to be made to the program, I would even appreciate if someone pointed me towards the right resources like examples and stuff. From what I know about the server itself, it should be apache/centOS.
Asked
Active
Viewed 828 times
-2

Deepon GhoseRoy
- 153
- 8
1 Answers
0
You can follow this guide: https://superuser.com/questions/338075/how-do-i-transfer-a-file-to-my-server-using-putty
And then you can access a terminal on the server (Putty can do that) and execute the script. But keep in mind that your script would stop executing once you log out, so be sure to find a way to avoid that, i.e.: Linux: Prevent a background process from being stopped after closing SSH client
Depending on your use case, you could choose a different solution.

psq
- 367
- 5
- 12
-
Thanks @psq, I finally have someplace to start. – Deepon GhoseRoy Mar 17 '18 at 09:24