简体   繁体   中英

Hosting a Mongo DB with a scheduled Python Script

I'm looking for a hosting service to run my python scripts. My python scripts take info from various API's and put them into a Mongo database. I'd like to schedule them so that they run once an hour. Right now I'm running python 2.6 and using a couple of extra packages like facebook sdk and python twitter tools. I've been looking into heroku, but I'm new to the service and I'm having trouble finding documentation on heroku and python. The other service that I came across is MongoHQ, but I'm unsure as to how that works with Python. Do you know of a hosting service that would be compatible with all of these things?

EDIT

I took the advice below and explored DotCloud a bit. For anybody who's a newb like I am, I wrote a post on it on my blog ( swootsblog.cloudfoundry.com ) which I hope is pretty easy to follow along with. It's a continuously running python script writing to a MongoDB all set up on DotCloud.

Heroku Does runs python scripts, I have previously done this with python to postgres database,

Pre-req

pythonscripts.py
procfile
requirements.txt

and After add, commit and push the scripts to heroku app. Just run the following command on terminal to run the scripts.

heroku run python your_scripts.py

More if you want to run this scripts on a schedule timing. then heroku provides lots of adds-on. just search it on heroku

If you need more help, make a chat with me.

Heroku doesn't run Python, they only run Ruby, Node.js, Clojure and Java.

There might be other services, but I've played around with DotCloud which has a python worker type for exactly this sort of work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM