On Tue, 16 Feb 2016 18:30:43 +0000, Nick wrote:

> Hey folks
> 
> I'm making a vibe.d application. Once a day it needs to download some
> data. How do i get the program to perform this task once a day?
> 
> Regards, Nick

http://vibed.org/api/vibe.core.core/runTask
http://vibed.org/api/vibe.core.core/sleep

Run a task in your application setup. Have it sleep until the appointed 
time, then execute the job in accordance with the prophecy.

I'd have it run your daily job in a separate fiber for error isolation.

If you want to run it at particular times of day, run if the application 
crashed before the appointed time, do the right thing with daylight 
savings, execute once across multiple processes, etc, I don't think that 
currently exists for vibe.d. It's a decent chunk of work to make all that 
happen properly.

Reply via email to