Solved

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

Posted on 2014-09-06
3
416 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 28

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 28

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now