Excepted crone.erl do you know a task scheduler for erlang OTP application ?
I look for a task scheduler with a fine timing (seconds, minutes, ..., months, ...).
John
What's wrong with crone? Seems to fit the bill, except for tasks run at very
large intervals. I guess the other thing missing from crone is scheduling
against UTC instead of local time. Otherwise it's pretty trivial to mould to
your needs.
If you need scheduling on a yearly basis, you should be able to take the
crone code and put a wrapper with coarse granularity around it very easily.
Robby
Yes, you can, kind of hack but should work
{daily, {every, {30, sec}}, {between, {0,0,pm}, {11,39,am}}}.
crone version available 2004 have lots of bugs and is quite slow
in calculating schedules which are very frequent (like 30 seconds).
You will probably need to tweak it somehow.
We have some more improved and optimized version of crone, but
unfortunately it isn't publicly available yet.
--
Witold Baryluk
The {daily, {every, {5, sec}, {between, {12, 0, 0, am}, {11, 59, 59, pm}}}}
schedule works fine for me. (Disclaimer, I've changed the until_next_time()
function to use simple 24 hour days for myself, so I hope that schedule is
correct for the crone.erl you can get online.)
I don't use the surrounding invocation code provided by crone though. I just
use the until_next_time() to get me the amount of time to put into my
gen_server timeout return values. The one thing that is a bit awkward is
dealing with milli-seconds. The crone code only goes to second granularity.
So if your task is over in less than a second, be sure to not invoke it
again by accident. If I remember correctly there was some explicit
sleep(1000) in the crone invocation code itself.
Robby