if in windows environment,
then, you can create a Win32 Application with a simple window, and you can hide this window. in this window, you can setup a timer, say, 2 seconds, and then you will receive WM_TIMER every 2 seconds, in this WM_TIMER responce function, you can do your daemon.
or, if you don't setup a timer, you can use a worker thread to implement your daemon work.
good luck !