How to write an agent using C toolkit?

how to write an agent using C toolkit ,and how to use an agent?I have to write an agent to move messages to another database.It has to be time scheduled say …every 2hrs

Subject: Is there a reason you need to use the C API toolkit?

IF all you are wanting to do is move documents from 1 Notes Database to another, it would be easier to do using Lotus Script or formula language. Here is a link to a How To technote on using the designer client and LS including information on creating an agent and getting it to run on schedule.

http://www-01.ibm.com/support/docview.wss?rs=463&uid=swg27010056