I'm fairly new to running programs from servers.
I have a program built in Java. I want to run that program every few minutes and update the new results. I can do this from my computer but I have to leave it on, with internet, etc...
I figured I could host this somewhere and have it do this for me, and then send me JSON results. What is the design pattern to do this?
I have built apis using php but never Java. Any suggestions? Thanks
This would depend entirely on the host.
Any cloud server ( Amazon EC2 , Rackspace , GoGrid ) where you can provision your own virtual server would be perfect for this. Since you can SSH or Remote in, you can setup a cron job or NT Scheduler job to run your Java program.
Also, services like Heroku (and I believe Windows Azure) let you provision worker instances, which can do this sort of job. For Heroku, check out background workers .
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.