Can a job spawn another job?

Asked by Thijs on 2011-10-28

I have a setup where - as a result of user input - a job (Job A) is created which adds a line to a mysql database. When this line is added, I need to create another job (Job B) which does some data manipulation.
Can Job A spawn Job B, and if so, is Job A only completed when Job B is completed as well?

Question information

Language:
English Edit question
Status:
Answered
For:
Gearman Edit question
Assignee:
No assignee Edit question
Last query:
2011-10-28
Last reply:
2011-11-02

1) Yes, you can spawn a job from another job.
2) Depends on how you execute the job; if you execute the job as a background task then no it will complete right away; if you do not execute it as a background then job A will not be completed until job B is done.

Can you help with this problem?

Provide an answer of your own, or ask Thijs for more information if necessary.

To post a message you must log in.