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

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.

Thanks,

Andre
CommerceShore
0
andreni78
Asked:
andreni78
1 Solution
 
LucFEMEA 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.

LucF
0
 
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.
0
 
darth_wannabeCommented:
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
cls
sleep 300
NET START SERVICENAME*

*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.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
andreni78Author Commented:
darth_wannabe,

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

Thanks,

Andre
0
 
darth_wannabeCommented:
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
0
 
clarkgodfreyCommented:
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?
0
 
Darren_CliffordCommented:
You could use group policy to apply a startup script with teh similar netstart commands in it
0
 
Sly HillProbSolv at LargeCommented:
Create a dependancy on the service:

http://support.microsoft.com/kb/193888
0
 
darth_wannabeCommented:
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.
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

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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