Schedule data generation
Last modified: October 8, 2024
You can use Windows Task Scheduler to create and manage data generation tasks that your computer will carry out automatically at the times you specify.
Scheduling data generation includes the following steps:
- Create a .bat file in dbForge Data Generator
- Create a data generation task using Windows Scheduled Tasks
Create a .bat file in dbForge Data Generator
First, you need to create a file with the .bat extension for data generation.
To create the .bat file, do the following:
1. Open an existing project or click New on the Start Page to create a new one.
2. On the Connection tab, specify the connection, select a required database, and click Next.
3. On the Options tab, set the default data generation options.
4. Choose the tables you would like to populate and click Populate the data to the target database.
5. In the Data Population Wizard that opens, set the required options and then click Save Command Line.
6. In the Command line execution file settings window that opens, verify and configure the settings to manage the *.bat file text.
Command-line file settings
Name | Default State | Description |
---|---|---|
Project File | No | Specifies data generation template to use. |
Connection | Yes | Specifies the connection string. |
Password | No | Specifies the connection password. Overrides the password specified in the connection string. |
Error Mode | No | Specifies the application behavior when an error is encountered; to ignore all errors during the data population, specify: ignore; to cancel the data population if any error occurs, specify: abort. |
Echo OFF | No | If this option is enabled, all the text in the.bat file will be enclosed in the @Echo OFF … @Echo ON construct. This will disable the display of the commands being entered on the screen. |
Keep opened | No | If this option is enabled, the pause command will be placed at the end of the .bat file text. This will leave the command window open. |
PowerShell | No | If this option is enabled, the & symbol will be generated at the beginning of the .bat file text. This will ensure PowerShell compatibility. |
Create a data generation task using Windows Scheduled Tasks
To create Windows task:
1. Open the Control Panel > Administrative Tools and select Task Scheduler.
2. In the Task Scheduler window that opens, navigate to the Actions pane and click Create Basic Task to create a scheduled task.
3. In the Create Basic Task Wizard window that opens, specify the name and description of the task and click Next.
4. On the Trigger tab, choose when to launch the task and then click Next.
- Schedule based on the calendar: Daily, Weekly, Monthly, or One time. For this, specify the schedule you want to use.
- Schedule based on common recurring events: When the computer starts or When I log on.
- Schedule based on specific events: When a specific event is logged. For this, specify the event log, source, and even ID using the drop-down lists.
5. On the Action tab, click Start a program to schedule a program to start automatically and then click Next.
6. On the Start a Program subtab, click Browse to select the .bat file you have created in the Data Generator Properties wizard and then click Next.
There are optional fields that you can set:
- Add arguments: Specify the arguments to run the task with specific instructions.
- Start in: Specify the folder in which the program will start.
7. On the Finish tab, verify the settings and click Finish.
The task will be displayed in the Active Tasks section.
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by Data Generator for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.