shino
shino

Reputation: 4734

How can I do the same thing over and over every 1-4 seconds in google app engine?

I want to run a script every few seconds (4 or less) in google app engine to process user input and generate output. What is the best way to do this?

Upvotes: 2

Views: 268

Answers (2)

Nick Johnson
Nick Johnson

Reputation: 101149

Reconsider what you're doing. As Ash Kim says, you can do it with the task queue, but first take a close look if you really need to run a process like this. Is it possible to rewrite things so the task runs only when needed, or immediately, or lazily (that is, only when the results are needed)?

Upvotes: 1

chickeninabiscuit
chickeninabiscuit

Reputation: 9351

Run a cron job.

http://code.google.com/appengine/docs/python/config/cron.html

http://code.google.com/appengine/docs/java/config/cron.html

A cron job will invoke a URL at a given time of day. A URL invoked by cron is subject to the same limits and quotas as a normal HTTP request, including the request time limit. .

Also consider the Task Queue - http://code.google.com/appengine/docs/python/taskqueue/overview.html

Upvotes: 2

Related Questions