1

I have 4 activities (currently as Symfony Commands) that I want to run sequentially every 5 hours (that will take around 30 minutes all in all).

I am wondering how this can be achieved with Gearman. Should I, to ensure sequential processing, create a worker with 4 functions which then gets triggered by a Client every 5 hours?

Thanks a lot for any answer. Steffen

2 Answers2

0

I have a answer and suggestion for your questions.

First of all, MessageQue systems like Gearman are suitable for Background processing jobs which are to be done at the moment in a non-blocking way.

If your requirement is to run this every 5 hours, then I guess, CRONJOBS are ideal for this kind of situation. Refer for some more details: Scheduling with gearman vs. cron?

If you have some very important reasons to use the GEARMAN, then yes, you should create a worker and set the cron job to call the worker every 5 hours.

Community
  • 1
  • 1
Vinod Tigadi
  • 859
  • 5
  • 12
0

if you add the gearman jobs with the same task ID, they'll run sequentially

georgiecasey
  • 21,793
  • 11
  • 65
  • 74