Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run a schedule task before a specified windows service (Service A). Service A starts automatically.

What is the best approach to take? Do I need to convert the schedule task into a service (Service B) and configure Service A to depend on Service B?

Thanks

share|improve this question
up vote 1 down vote accepted

Services can't depend on scheduled tasks, so you can't do it that way.

Making a service depend on another may not do what you need, either; That just makes sure that service B is running when service A is started. If you need your custom task to finish its operations first, that won't help you.

What you can do is set the service to Manual start, and have your task start the service after doing what ever else it must do.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.