Here I am developing an windows application which stores the intime and outtime of an employee using Employee Id. status is used to know whether employeee is IN or OUT.
I have done all this stuff.
Now i need to send an email which carries the details where status is equal to IN. and this process should be done for evrey 30 min.

Also i need to calculate the differene between Outtime and intime that is total working hours.

Solution 2

Set up a timer, probably one minute intervals is fine, then have a counter which gives you the half hour. In the timer Tick event handler deal with the counter, and when it expires read the data from the DB.