Solved

how to write scheduled task to stop/start sqlwriter sbs 2011 backup

Posted on 2014-09-06
3
447 Views
Last Modified: 2014-09-11
Hi,

I want to setup 2 scheduled task to stop/start sqlwriter

The syntax is:
net stop sqlwriter
net start sqlwriter

These task will be executed before and after a daily backup

I'm not sure as to how to write a scheduled task for this purpose.

Thanks in advance,
Isaac
0
Comment
Question by:TechIsaac
[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
  • 2
3 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 40307797
How is the backup being run ?

I would suggest one scheduled task that runs:
net stop sqlwriter
Run backup step
net start sqlwriter

Here is a previously answered question on scheduling a task.  (you can specify username if you are able to user a command line sql tool for backup)

 schtasks /Create /tn Servicecheck /S %a /tr c:\temp\file.bat /SC DAILY /RL

More info on the schtask command:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx
0
 

Author Comment

by:TechIsaac
ID: 40310917
The backup is scheduled to run nightly via the backup utility.

Can I schedule a batch file via the task scheduler on the server (control panel)

I want to stop the service at 9pm , run the backup at 11pm daily and
start the service at 7am

Thanks,
Isaac
0
 
LVL 29

Expert Comment

by:becraig
ID: 40310927
Here is a very easy walkthrough:
http://clickhome.freshdesk.com/support/articles/107608-how-to-setup-windows-auto-scheduler-task-to-restart-clickhome-windows


This includes the creation of the batch file, which in your instance you will create two tasks one to start the service and one to stop it.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to use a 2TB Time Capsule as a wired External Drive? 4 90
Copying out Cisco backups from SolarWinds 13 121
Exchange server take over 4 53
junit initializtion error 2 20
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

734 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