Solved

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

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Auto-indent certain lines in Notepad++ 10 111
SBS 2007 remove AD ? 10 72
VMware SRM - Datastore not showing in Array Replication 11 74
Cannot boot from BackupAssist recovery disc 8 43
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

839 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