开发者

google-app-engine simple cron format of multiple task

开发者 https://www.devze.com 2023-01-08 23:18 出处:网络
Let开发者_如何学JAVAs 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

Let开发者_如何学JAVAs 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消