ANN: crone - cron in Erlang (sort of)

Sean Hinde <>
Thu Jul 4 14:53:10 CEST 2002

Well, here's one I wrote earlier.

The API is unfinished (stuck somewhat between two methods) but it does seem
to work well enough.

This one sends a tick to itself every minute and does any jobs which are
scheduled at that time. There are some (slightly incorrect) docs in the code

You can also have a job run at startup which returns a state which is passed
through future invocations.

Someone might find it useful.. cron.conf is in the priv dir


> -----Original Message-----
> From: Gerd Flaig [mailto:]
> Sent: 04 July 2002 10:35
> To: Chris Pressey
> Cc: 
> Subject: Re: ANN: crone - cron in Erlang (sort of)
> 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

This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cron-1.0.tgz
Type: application/octet-stream
Size: 3515 bytes
Desc: not available
URL: <>

More information about the erlang-questions mailing list