Solved

is it possible to call a method or whatever in order to make a service do something?

Posted on 2009-04-15
4
162 Views
Last Modified: 2013-11-07
hello experts,

i have a service that does a job once a day,
the schedule is done inside the service.

is it possible to call a method from a service,
in order to make it work when invoque it?

if its possible
any link for a reading on the matter would be appreciated,
i'm looking for an example too,

thank in advance.
0
Comment
Question by:toshi_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 12

Expert Comment

by:wht1986
ID: 24148752
You can use the ServiceController class and call the ExecuteCommand method to run some custom method on that service.  MS has an example at http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.executecommand.aspx
0
 
LVL 12

Expert Comment

by:wht1986
ID: 24148763
0
 

Author Comment

by:toshi_
ID: 24148778
thank you for your reply wht1986,
i'm gonna look at it if i understand,

i'll be back ;o)

0
 
LVL 12

Accepted Solution

by:
wht1986 earned 250 total points
ID: 24148885
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question