is there any library or core functionality for lau...
# coroutines
n
is there any library or core functionality for launching a job in a specific interval? or would a "simple"
while(true) { launch { doJob() }: delay(..) }
be the preferred solution ?
g
Yep, standard while(true) (or while(isActive) is way to go I would be careful with launching coroutines in while(true), you may start too many (before previous is finished), of course it may be fine for your case
n
the usecase is a cronjob like thing where i just regularly check if a reminder in a database is due to be delivered and send it to chat.. i guess i should not even launch it
g
yep, calling a suspend function looks as better solution for such case