Where to host periodically running Python or Java service?

I am going to create a small service that tracks an IMAP email account and acts on read messages. To do this, simply run every 10 minutes, no external trigger is required, but I want to use this service from the outside (so I do not need to worry about time).

To be machine independent, I could write a service in Java or Python. What are good hosting providers for this? , and which of the two languages ​​is better supported?

The service must either start all the time (and must itself wait), or it must start every 10 minutes. I assume that most (network) hosts are query-driven code (like JSPs), and I assume that they terminate processes that take forever. Who offers hosting for custom services such as those mentioned above?

+4
source share
3 answers

Depending on what actions you require and your resource requirements, the Google App Engine may be quite suitable for both Python and Java services (GAE supports both languages ​​pretty well). cron jobs can run every 10 minutes (the URL I gave shows how to do this with Python), and you can queue up more tasks if the amount of work that needs to be done at a certain point exceeds the 30 second limit supported Gae.

GAE is especially nice to start and experiment with, as it has reasonably reasonable free quotas for most resources that your tasks can consume (you need to enable billing, provide a credit card, and set up a budget so that your jobs consume more than their free quota, although )

If you decide that GAE has limitations that you cannot endure, or would be too expensive to use resources over free quotas, any hosting provider that supports Unix-like job schedulers should be acceptable. Starting from scratch, a Python script every 10 minutes can be faster than starting from scratch of the JVM, but it depends on what you have to do every 10 minutes (for some tasks, Python will be just as fast, or maybe even faster - for others, it will be slower, and we have no way to figure out what tasks you will need or at what “tipping point” the faster JVM “will pay for its own launch” if possible - lighter Python ... basically you need to evaluate this is for yourself! -).

+5
source

You're lucky since Google AppEngine provides CRON jobs for both Python and Java. GAE - Python GAE - Java

+3
source

Check out the Google App Engine . You can configure the cron job for Java or Python script.

0
source

All Articles