Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-04-15
4
Medium Priority
?
166 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 1000 total points
ID: 24148885
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

604 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