how to delay start a service?

Dear Experts,

I have custom mail sending program that only works properly when I manually start its service after windows 2003 server has completed all of its loading after reboot.

Using a Command Prompt I can manually start it as follow:

C:\sendmail\SRService.exe -s

How do I schedule this service to start so that it starts LAST after everything else complete loading? another way is delay in say 5 minutes?

FYI: this WIndows 2003 Server has been applied Hight Security template that came with the Microsoft Security Guide for Windows 2003 that I downloaded from Microsoft site.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Luc FrankenEMEA Server EngineerCommented:
Why not using the taskmanager to run it after a reboot? Schedule it to run only after let's say 2 minutes of inactivity. This makes sure everything has started before this program runs.

Rob StoneCommented:
You could use TIMEOUT which is on the NT4 Resource kit and then the line you use in a batch file.  Not sure if its on the 2000 resource kit.
Set the service to Manual instead of Automatic. (right-click my computer, manage, services)

Create a new batch file and put it somewhere.

in the batch file, do this:

@echo off
sleep 300

*the name of the service you want to start

Add a shortcut to the batch file to your startup (in the start menu). Adjust the time to sleep to be whatever you want.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

andreni78Author Commented:

That is the best answer with step by step. I love it. I will try it and let you know.


just reread the post....rather than using net start, you can just run your command as well. So you can replace net start with your C:\sendmail\SRService.exe -s command

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This is great. But how do you run this at startup NOT logon. As on a 2003 server after reboot that might not have anybody log on?
You could use group policy to apply a startup script with teh similar netstart commands in it
Sly HillProbSolv at LargeCommented:
Create a dependancy on the service:
one of the advanced scheduling options in a scheduled task is to run on system startup. You can use that as well. just make sure that the credentials you supply fo the scheduled job has access to do that.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.