1

I use the Google App Engine datastore for temporary data storage. I need some way of automatically deleting every entry in a datastore model, every x hours.

How do I do this within Google App Engine? My app uses the Python runtime.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user1814016
  • 2,273
  • 5
  • 25
  • 28
  • possible duplicate of [How to delete all datastore in Google App Engine?](http://stackoverflow.com/questions/1062540/how-to-delete-all-datastore-in-google-app-engine) – Joachim Isaksson Jul 28 '13 at 15:18

1 Answers1

1

Use Scheduled Tasks: https://developers.google.com/appengine/docs/python/config/cron

The App Engine Cron Service allows you to configure regularly scheduled tasks that operate at defined times or regular intervals. These tasks are commonly known as cron jobs. These cron jobs are automatically triggered by the App Engine Cron Service. For instance, you might use this to send out a report email on a daily basis, to update some cached data every 10 minutes, or to update some summary information once an hour.

A cron job will invoke a URL, using an HTTP GET request, at a given time of day. An HTTP request invoked by cron can run for up to 10 minutes, but is subject to the same limits as other HTTP requests.

user7180
  • 3,756
  • 2
  • 22
  • 26