Suppose I have a recurring task(essentially a scheduler) that is to trigger say when some event happens or X days after some event has happened. Is using cron the most efficient way or there is some other technology I can use for it ? This X can be as large as 360 days even. Somehow I just don't feel I should be using cron here.
No, all types of cronschedulers run tasks based on time; not on events.
You must use a scripting/programming language to 'listen' for your events. This script can be scheduled in cron to run each minute - it will look like your machine waited for the 'X' event only. cron and its alternatives are excellent for simple time-based scheduling.
We use the whenever gem to schedule frequent events (it's a Ruby/Rails interface to cron). For infrequent, one-off events perhaps look at atd. Failing that, a message queue of some description.
Ujjwal Kanth
Search @Unbxd
Cron on production scale is not a good idea.
Mesos. But depends on the scale of things here. Also there is a module call Chronos by AirBnB which can be used on top of Mesos, and will work as time based schedular. There is another project which does something similar, GEvents + Celery
Another approach is to use Queues, for instance Use RabbitMQ and write triggers that wait for certain amount of time.