Zero logo

Create Scheduled Task

The following page explains how to create a scheduled task in Windows to run the Uniform Server MySQL Auto Backup plugin. Although the instructions are specific to the Uniform Server plugin, they are equally applicable to running other applications, such as executables and batch files. Note that you must be logged on as an Administrator.

Create a task

Step 1: Start Task Scheduler
To start Task Scheduler, use one of the following methods. Preferred method is method 1.

Method 1: Navigate to folder C:\UniServerZ\utils and double-click on start_task_schedule.bat
Method 2: Use a command line; open Run command (Windows key + R), type %windir%\system32\taskschd.msc /s


Step 2: Task Scheduler - Create task
The Task Scheduler window allows you to create, delete and administer tasks. Start the task creation process as follows:

  • Click Create Basic Task (a2) - Opens the Create Task window.
Task scheduler

The Create Basic Task Wizard window is shown below. Every task must have a unique name and preferably a description.

  • Enter a Name in the Name field (b2). Use UniServer_Auto_Backup
  • Enter a Description in the Description field (c2). Use Uniform Server MySQL automatic backup
  • Click Next button (d2).
Create basic task


Step 3: Create Basic Task Wizard - Task Trigger
You need to decide how often you want to create a MySQL database backup. Generally, once a week is adequate. However, this example sets it to once a day for critical data applications.

  • Select one of the options: Daily, Weekly or Monthly. For this example, select Daily (a3) for a daily backup.
  • Click Next button (b3).
Task trigger


Step 4: Create Basic Task Wizard - Daily
This step allows you to set the starting date and time of the task. Generally, there is no need to change the start date. The start time requires a little thought; preferably, set the time when your server is under minimum load (check the Apache log for this information). If you want the backup to occur every day, set the Recur Days to 1. If you want it to occur once every three days, set value to 3.

  • Set the starting date and start time (a4).
  • Set Recur every 1 days (b4) - Makes backup every day.
  • Click Next button (c4).
Set date and time


Step 5: Create Basic Task Wizard - Action
This step allows you to select the action to be performed. Click radio button to select required action for Uniform Server; we are going to run a program.

  • Select Action, click Start a program radio button (a5).
  • Click Next button (b5).
Set action to program


Step 6: Create Basic Task Wizard - Start a Program
This step allows you to set the location of the program by either typing in the full path, or by clicking on the Browse button and navigating to the required application. You can optionally add arguments; Uniform Server requires "auto" to be set.

  • Program/script (a6): Click Browse button.
         Navigate to application UniDbBackup.exe; for example, C:\UniServerZ\utils\UniDbBackup.exe
         Click Open button.
  • Add arguments (b6): Enter auto
  • Click Next button (c6).
Start a program


Step 7: Create Basic Task Wizard - Summary
This is the final step in the creation of the scheduling process. Although optional, you can open the properties' dialog for this task. Click on the check box Open the Properties dialog for this when I click Finish. Finally, click on the Finish button to complete the process.

  • Check box Open the Properties dialog for this when I click Finish (a7): click to select.
  • Click Finish button (b7). New task is created and added to Windows schedule.
Task finish summary


Step 8: UniServer_Auto_Backup Properties (Local Computer)
This displays task properties; shown for completeness.

  • Click OK button (a8).
  • Click File > Exit
Task properties

Delete a task

Step 9: Task Scheduler - Delete task
To remove a task, start Task Scheduler, select task from the library list and delete. The following details how to remove the Uniform Server UniServer_Auto_Backup task:

  • Start Task Scheduler: Navigate to folder C:\UniServerZ\utils and double-click on start_task_schedule.bat
  • Left menu: Select Task Scheduler Library (a9)
  • Center menu: Select UniServer_Auto_Backup (b9); ensure it is highlighted.
  • Right menu: Click Delete menu item (c9).
  • Pop-up displayed Do you want to delete this task; click Yes button.
  • Click File > Exit
Delete a task

Run task - Quick test

Step 10: Task Scheduler - Run task
For testing, there is no need to wait for the scheduled time. You can instantly run the task as follows:

  • Start Task Scheduler: Navigate to folder C:\UniServerZ\utils and double-click on start_task_schedule.bat
  • Left menu: Select Task Scheduler Library (a10)
  • Center menu: Select UniServer_Auto_Backup (b10); ensure it is highlighted.
  • Right menu: Click Run menu item (c10). - Forces a run with the parameters set.
  • Click File > Exit
Run task


--oOo--