Below we will cover two options of running your Data Sync project unattended and on a schedule.
If you have multiple Data Sync projects you want to run in sequence then we would recommend looking at the Run Tool to collate your projects and then use the Task Scheduler to schedule them. You can read more on the Run Tool and how to use it in our Run Tool Documentation.
There are two options available: running the project from the command line or adding the project to a scheduled task in Windows Task Scheduler.
Open the Command Line and navigate to your directory that contains your Data Sync project. You can then use the following code, passing in the name of the project you want to run:
"%DATASYNCINSTALLPATH%\Simego.DataSync.Run.exe" -e "project.dsprj"
You can also run multiple Data Sync projects in one command and the next project will only run if the previous one succeeded. Again, navigate to the directory that contains your Data Sync projects and then use the following code, passing in the names of each of your projects:
"%DATASYNCINSTALLPATH%\Simego.DataSync.Run.exe" -e "project.dsprj" "project2.dsprj"
To start open Windows Task Scheduler and create a folder to hold your scheduled tasks. You can do this by going to the Actions Window and selecting
You may need to run Task Scheduler as an administrator to be able to do this.
To create a task either right click into the task window and select
Create New Task or go to the Actions Window to the right and select
Enter in a name and description for the task, and make sure to set the security options to the correct user account that has permission to run the task.
To add the Data Sync Project to the task, click onto the
Actions tab and select
Now enter in the path to the Run Tool executable in the
Program/Script field. You can use
"%DATASYNCINSTALLPATH%\Simego.DataSync.Run.exe" or browse to the location of the Simego Programs folder and select
For the Add arguments field enter in
-e and the name of the project to run followed by .dsprj. An example of what could be entered is:
If your project is in a different directory you can enter the path in the Start field. For example
If you want to attach multiple Data Sync projects to a Scheduled Task then you can add the project to the arguments list so long as the project is in the same directory.
e.g. the arguments would look like this to pass in three Data Sync projects
-e "MyProject.dsprj" "MyProject2.dsprj" "MyProject3.dsprj".
Otherwise, if the projects are in different directories then you will need to add them as separate actions within the task.
Now we can create the schedule to run the project.
Go to the trigger tab and select
New to define the schedule that you want the project to run on.
The example below shows a possible configuration for a Start of Day trigger.
Set how frequently you want it to run (e.g. Daily), a start time, and set the recurrence frequency. We also recommend setting a stop task if it runs longer than a certain length of time, in-case there is an error.
You can now check the task runs as expected by right clicking and selecting
Run from the menu.
The result will be a code returned in the Last Run Result column.
0x0code will be returned.
0x1code will be returned. Check out the log file in the .ds folder for more details.
You may also want to enable task history so then you can see when the task ran. This can be done from the Actions window to the right and may already be enabled by default.
If you are getting errors or the task is not running, please check Windows Event Viewer for any error messages. This will be where you can find details about the running of the task.
If you are getting the
0x1 error code in Task Scheduler then this is being returned by Data Sync. Have a look in the log files in the
.ds folder for that run to see what the error was. The .ds folder can be found in the same directory as your Data Sync project and will store all of the log files for each run of the project.