title: Flask - periodically rendering html without context
body: <p>I would like to have a periodic task which renders an html file and uploads it to s3 via boto.</p>
  
  <p>The problem with this is that since the task is outside of an endpoint function (i.e. decorated by app.route), there is no Flask context.  So, when my task executes and render_template is called, there is an exception due to there being no context:</p>
  
  <pre><code>Traceback ........
      File "/usr/local/lib/python2.7/site-packages/flask/templating.py", line 126, in render_template
      ctx.app.update_template_context(context)
  AttributeError: 'NoneType' object has no attribute 'app'
  </code></pre>
  
  <p>My task is initialized something like this, where I pass in the function I want to execute periodically:</p>
  
  <pre><code>HtmlUploader.new(
      lambda: render_template('something.html', value=get_value())
  ).start()
  </code></pre>
  
  <p>Is there any way I can call render_template outside of an app endpoint function?</p>