ANN: crone - cron in Erlang (sort of)

Gerd Flaig <>
Thu Jul 4 11:35:00 CEST 2002

Chris Pressey <> writes:

> For each task you wish to schedule, crone creates a process.  Each process
> calculates the time until the task will next be run, calls timer:sleep/1
> for that duration, runs the task, and repeats.

perhaps it would be better to organize the tasks to be run in a
priority queue with the next time to run as key. That way, you only
need one process that calculates the time to wait until the next task
should be executed, then spawn the process to execute that task. Saves
lots of processes.

       Goodbyte, Gerd.
Gerd Flaig                     Technik                
Bei Schlund + Partner AG       Erbprinzenstr. 4-12  D-76133 Karlsruhe
 Physics is like sex: sure, it may give some practical results,
 but that's not why we do it. -- Richard Feynman

More information about the erlang-questions mailing list