Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scheduling with gearman vs. cron?

Tags:

cron

gearman

I have noticed a lot of people discussing Gearman and it's scheduling features making it enable to distribute work onto other servers. However, I have not yet seen a comparison to native cronjobs.

What are the differences between cron and Gearman?

like image 465
Industrial Avatar asked Jun 02 '10 22:06

Industrial


1 Answers

If you're doing pure scheduling, using Gearman is unnecessary.

The main differences between Gearman and cron are that:

  1. cron jobs are only triggered only based on time, while Gearman functions are triggered by calls by other applications.
  2. Gearman is used for coordinating tasks between multiple systems, as you mentioned, while cron provides no synchronization. As a result, asynchronous tasks are better for cron, and vice versa.

Unless your application needs to farm out heavy-duty synchronous processing to other servers, I would recommend you to use cron and keep it simple.

like image 57
phsource Avatar answered Oct 05 '22 04:10

phsource