creating window service in c#

  • Thread starter Thread starter raju akula via DotNetMonster.com
  • Start date Start date
R

raju akula via DotNetMonster.com

hi,

I have two databases named abc and xyz.

I have to run a job everyday 9 p.m.
first I have to check the abc database tables, that if
anybody registered a compound in
the table within 24hrs of the job running.(like if my
job executes today 9 p.m.
then the abc database tables should be checked for
previous 24 hrs.)
Then if I find any compounds registered in the
previous 24hrs in the abc database,
I should update my xyz database tables.

Compounds which are registered
before the time period should be skipped(means if they
are registered more than 24 hrs previously,
those compounds should be skipped).


I need example with two assumed tables each in the
corresponding databases abc and xyz.
 
I doubt that you will get many takers willing to write all this code for
you, but the easiest way is not to create a windows service. Just write up
your busines logic as a console app and have Task Scheduler run it for you
at the appropriate schedule.
Less resource use than having a service running that only needs to run 1X a
day.
Peter
 
I might point out that, this approach assumes that the application / service
will run perfectly without error. This is a poor assumption. Keep that
in mind. I've written a few services that work on the concepts you've presented,
and you need to have a way for it to know where it left off. (In case the
power goes out and it doesn't run for 3 days, it *usually* needs to go back
and pick up the data from 3 days ago)

--Brian
 
Back
Top