Solutions Products Download Purchase Support News Members Company
SITE FEED
Support Forum
The fastest and most effective to get answers to your questions quickly.
FAQs
Quick answers to common questions.
Troubleshooting
Known issues and basic troubleshooting techniques for problems or unexpected behaviors.
Knowledgebase
Technical tips, How-to articles, and other tutorials about ApexSQL Tools.
Online Documentation
All of our help files for download or convenient viewing online.
Videos
Watch product demos, training videos, or tutorials of our products' main features. 

ApexSQL Knowledgebase

Tips and How-to Articles for Apex SQL Tools


How to schedule CLI command execution with Windows Scheduler

DESCRIPTION
This article describes how to create Windows BATCHES (.bat files) that will allow us to schedule ApexSQL application tasks unattended, overnight, and like.
SOLUTION
In this example, we schedule a task to run Monday through Friday at 3:00 AM.

1. Create batch (*.bat) file containing the ApexSQL CLI command.

For example, here is a sample CLI command:

CODE:
APEXSQLPRODUCT.COM /S:TESTSERVER /D:TESTDB /SQL:<FULL PATH>\RESULT.SQL /EXCLUDE_SYSTEM_TABLES /VERBOSE


Save this statement on a batch file (.bat).
2. Open Scheduled Tasks window from windows Control Panel
3. Click on the Add Scheduled Task link
4. Click on the Next button on the first wizard steps
5. Click on the Browse button on the next step:


6. Browse do the batch file created on step1 and select it
7. Specify scheduled task name and set perform this task Daily:


Click on the Next button
8. Set Start Time on the next steps and set Weekdays run configuration:


Click on the Next button
9. Set account and password which will execute scheduled task:


Click on the Next button
10. Check open advance properties checkbox and press on the Finish button:


11. Verify Task and Schedule tabs that everything is created correctly.

AUTHOR
Dmitriy Dyubchenko

LAST REVIEW DATE
12 February 2009

Labels:



© 2010 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy