Task Scheduler

Automate replication via Windows Task Scheduler — daily, weekly, or monthly.

Overview

Replicator-NG integrates directly with Windows Task Scheduler via COM. You can create, update, and delete scheduled replication tasks — all from the GUI's Schedule panel.

Creating a Task

  1. Open the Schedule panel in the GUI
  2. Set the Task name (default: "Replicator-NG")
  3. Point Config to your config file (or click Use Current)
  4. Select Frequency: Daily, Weekly, Monthly, or At Logon
  5. Set the Time (not needed for At Logon)
  6. Click Create Task

The task is registered in Windows Task Scheduler immediately. You can verify by opening taskschd.msc and looking for your task name in the root folder.

Frequency Options

FrequencyBehaviour
DailyRuns once per day at the specified time
WeeklyRuns on selected days of the week (default: Monday only). Tick additional days for multi-day schedules
MonthlyRuns on a specific day of the month (1–28)
At LogonRuns whenever the current user logs on to Windows

What the Task Runs

The scheduled task executes:

replicator-ng.exe --silent --config "replicatorconfig.toml" --sync-deleted --nonvolatile

This performs an incremental sync: copies new rows, UPSERTs changes, deletes rows removed from Access, and skips unchanged nonvolatile tables. All output is written to %APPDATA%\ReplicatorNG\logs\ — no console window appears.

The path to replicator-ng.exe is captured when you create the task — if you move the executable later, you'll need to update or recreate the task.

💡 Need a full refresh? Edit the task in Task Scheduler and add --full-refresh to the arguments. This drops and recreates all rows instead of incrementally syncing.

Managing Tasks

The GUI checks for existing tasks on startup — if a task with the same name already exists, the button shows "Update Task" instead of "Create Task".

Start Boundary

The task's first run date is automatically set to tomorrow — so your task won't trigger immediately. This prevents accidental duplicate runs on the day you create it. The task will fire at the specified time starting the next day.

Viewing Execution History

Open Windows Task Scheduler (taskschd.msc), find your task, and check the History tab. Each run shows:

If the task fails, the exit code tells you why: 1 = config error, 2 = connection error, 3 = replication error, 4 = validation failure.

Log Files

When running scheduled tasks, use --silent mode to write logs:

replicator-ng --silent --config "replicatorconfig.toml" --sync-deleted --nonvolatile

Logs are written to %APPDATA%\ReplicatorNG\logs\replicator-ng.YYYY-MM-DD.log with daily rotation. No console window appears — ideal for unattended operation.