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

creating a scheduled task to restart an existing service in SERVICES.MSC

Hi,

  I have a service called "workflow" in services.msc (on Windows 2008 Std) that becomes ineffective from time to time, so I end up restarting it once a week on average when the user calls me.
 Can I create a DOS command script, store in .BAT file and have it run once a day so that I don't have to open SERVICES.MSC and re-start every time the user calls me with the problem.

Path to Executable:
C:\Program Files\Software Systems, Inc\DirectoryName\Workflow.exe
Logon as "Local System Account"

Thanks.
0
sglee
Asked:
sglee
1 Solution
 
xDUCKxCommented:
net stop workflow
net start workflow

Open in new window


or

taskkill /F /IM workflow.exe
C:\Program Files\Software Systems, Inc\DirectoryName\Workflow.exe

Open in new window


Top one will use the services.msc snap in to stop/start cleanly

Bottom one will forcefully kill the process and start it again.
0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

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