Tutorial :google-app-engine simple cron format of multiple task



Question:

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


Solution:1

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »