• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

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

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
Erwin Pombett
Asked:
Erwin Pombett
  • 3
1 Solution
 
wht1986Commented:
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
 
wht1986Commented:
0
 
Erwin PombettAuthor Commented:
thank you for your reply wht1986,
i'm gonna look at it if i understand,

i'll be back ;o)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now