Solved

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

Posted on 2014-09-06
3
428 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
  • 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
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…

773 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