Calling a function based on time frequency

Hi All,

Is there any way to call a function periodically (every minute) in the background without using the schedulers like Cron / phoenix job.

Thank you.

Yes You can… with Process.send()

The longer version is, You can have a gen_server sending itself a message periodically, and in the handle info, process some work, and resend itself a message.

1 Like