You can use the Task Queue API from any servlet/handler. So define a new servlet, to be triggered by either an incoming request or a scheduled task, that then retrieves the default queue and adds new tasks to the queue.
For example, if you have a servlet that gets triggered when a user submits a registration form, you can add code to that servlet to push a new task to the queue which, when executed, sends the user a confirmation email, etc. - Jason On Sun, Oct 25, 2009 at 4:11 PM, Vincent <[email protected]> wrote: > > It should be a stupid question but I really don't know how to do it ; > ( > > My understanding is: > just like the Scheduled Tasks With Cron. there is a separated fix- > named xml file to define the target url and schedules. once you > upload, the google app engine can automatically find it and run it. > > but how is the Task Queue? > the queue.xml is is only a part of the answer. we need use the > taskqueue to define the target the url and related parameters. just > like below codes: > > =============================== > import com.google.appengine.api.labs.taskqueue.Queue; > import com.google.appengine.api.labs.taskqueue.QueueFactory; > import static > com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.*; > > // ... > Queue queue = QueueFactory.getDefaultQueue(); > queue.add(url("/worker").param("key", key)) > > ================================= > > but where to put these code? I guess it should be another > separated .java file. > but what's name and what's the structure of this file? it's much > appreciated if somebody can share a full example of the task queue > files. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
