This article applies to WaspTime v7 and v6.
Download, save, and extract the following zip file on the server (the PC that holds the database):
Inside the extracted folder, double-click the BackupDB4WT6.bat file. Note: The zip file must be extracted first. If BackupDB4WT6.bat is run from within the zip file, it will not work. This creates a backup file in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\. The filename will be WTbackup_<date.stamp>.bak.
If you need to change the path or filename, edit BackupDB4WT6.wql with Notepad to change the line starting SET @FileName. If you are changing the file path, it must be an already-existing folder on a local disk on the server, or the script will fail. A network location, either a UNC path or mapped drive letter, will not work. This is a characteristic of Microsoft SQL Server and cannot be changed.
To schedule this process to run automatically, you can make use of the Windows Task Scheduler, as follows:
Windows 10, 8, 7, or Vista: Go to Start > All Programs > Accessories > System Tools > Task Scheduler. It may spend a few seconds adding a snap-in to the management console, then it will open. On the Actions pane at the right, select Create Basic Task. Provide a name for the task, like WaspBackup, then click Next. Chose how often you wish the process to run from the list, then click Next to enter the details. Depending on how often you selected, you will be prompted to enter the day of the week or month and the time to run the process. On the next page, it will ask what action you want it to perform. Click the radio button for "Start a program" and click Next, then Browse. Locate BackupDB4WT6.bat, select it and click Open, then Next. If you check the box for "Open the Properties dialog for this task when I click Finish", it will open an interface with many additional conditions for the task. This is where you can specify a different user for the task to run as, as well as options for whether to run when the user is logged in only, or whether the user is logged in or not. It does default to only when the user is logged in. Also, on the Settings tab, there are boxes for "Run task as soon as possible after a scheduled start is missed" and "If the task fails, restart every:", which you should look at. This Properties window is the same as what opens if you initially choose Create Task rather than Create Basic Task, so you may start here, but the initial rule creation may be easier in Basic Task. To see the task, click Task Scheduler Library at the top left. Click on the task in the top center pane, and the Properties will be shown in the bottom center pane for verification. If you need to change any of the settings, you will need to right-click the task and select Properties.
Windows XP: Go to Start > All Programs > Accessories > System Tools > Scheduled Tasks. Double click Add Scheduled Task. Click Next on the welcome message, then Browse. Locate the BackupDB4WT6.bat file and select it. Chose how often you wish the process to run from the list, then click Next to enter the details. Depending on how often you selected, you will be prompted to enter the day of the week or month and the time to run the process. You will then be prompted for the username and password of a Windows user, and the task will run as that user. You should enter a user who has sufficient rights in Windows to run the bat file and write into the specified directory. If you choose to open the advanced properties for the task, you will be able to specify several additional things, like whether to run the task when the computer is on battery power, etc. Usually the default settings will be fine. The task will now be shown in the Scheduled Tasks window, should you wish to check/change the properties or verify the status of when it will run, when it last run, and whether it failed when last attempted.