views:

32

answers:

1

Lets say I want to schedule task a,b,c,d for cron to run a,b,c,d and wait one hour, before running again. Specific time doesn't matter and each task can vary in time, so what would be the format to have d run when c is done , run c after b is done, run b after a is done etc.

This is what I am currently thinking?

  • description: a url: /tasks/a schedule: every 1 minutes
  • description: b url: /tasks/b schedule: every 1 minutes
  • description: c url: /tasks/c schedule: every 1 minutes
  • description: d url: /tasks/d schedule: every 1 hours
+1  A: 

If I understand your question (and I'm not sure I do), what you want is a combination of scheduled tasks and task queues. Schedule a to run via cron at whatever interval you like. Don't schedule b, c, or d at all.

At the end of your handler for a, enqueue a task to run b; at the end of your handler for b, enqueue a task for c, and so forth.

Drew Sears
yes basically i want to run task a,b,c,d sequentially one after another, and wait 1 hour before starting a again and keep repeating the process.
see any example code for adding the enqueue I am reading the task page right now.
taskqueue.add(url='/worker', params={'key': key})
Drew Sears
The overview page has lots of examples: http://code.google.com/appengine/docs/python/taskqueue/overview.html
Drew Sears