cron - App Engine - Scheduling repeating actions initiated by a user? -


I want to extract a way to get started with the start of the repetitive tasks (with a very low repeat time) Trying to do some user action, neither work nor cron is fit in this right direction. The cron does not seem appropriate for the user getting started and does not seem to be appropriate for repetitive programs.

I want to do something to the user who wants to start repeating action again should take action every 5 seconds. Ultimately, when the user does something else, the repeated action ends.

Is there any other part of the app engine that I do not know is it best to deal with it? Or is there any good way to do this with work or cron? Or should I do something completely? Thanks!

You have two options I do not know all of your requirements, so I list both.

  1. When a user starts an action, one unit is saved in the datastore (for example, "ActionInTT"). A cron job queries periodically from the datastore, and if an action-taker exists, then creates a task to do the job. When a user cancels the action, the action unit is removed, the next time Cron job asks for it, it will not show up and will not make any work.

  2. When a user starts an action, then a task is created. When the job is finished, it checks that the user has canceled an action, if not, then it creates another task to execute with a specified delay. And so on

    Update:

    If you need a very accurate execution, you may have to use the timer in your examples, but then Must have to design their failed-over mechanism, possibly using a memcatch.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -