Since you are new you have a bit of learning to do. I would highly reccomend you play with django and understand how to make a simple webpage with it. This (or ruby on rails) is how professionals serve webpages.
Once you understand how to install / use the framework you can look at this link for background tasks: https://pypi.python.org/pypi/django-background-task
In Ruby on Rails these are called rake tasks. After the task is done you usually retrieve the output using the database ( or write results to a file on disk).
If you don't know how to setup or run a server I would look at heroku: https://devcenter.heroku.com/. They have a free tier of servers which works easily with git and is seriously zero hassle. That link has instructions for the multiple languages they support. Good luck!!