Running Data Loader Migration Jobs Automatically


Data Loader's built-in scheduler only runs jobs while a user is logged on. If you need migrations to run whether a user is logged on or not, use Windows Task Scheduler together with the Data Loader runtime.

Data Loader ships with a separate runtime that executes database migration jobs from the command line — useful for triggering a migration from another program or from a schedule. The syntax is:

DLRUN.exe <session_id> [showoutput]

Where session_id is the ID of the session to execute, and showoutput (optional) shows an output window if specified.

Creating a Basic Task

Step 1 — Make sure you've created and saved a session in Data Loader, run it successfully, and noted its Session ID.

Step 2 — Start Task Scheduler in Windows:

  1. Click the Start button
  2. Click Control Panel
  3. Click System and Security
  4. Click Administrative Tools
  5. Double-click Task Scheduler

Step 3 — In the Task Scheduler window, click "Create Basic Task..."

Task Scheduler create basic task

Enter a name for the task.

Task Scheduler task name

Choose your desired interval and click Next.

Task Scheduler interval

Task Scheduler interval details

Choose the "Start a program" action and click Next.

Task Scheduler action

Click Browse, navigate to your Data Loader installation folder (typically C:\Program Files (x86)\Data Loader 4.8), and choose DLRun.exe.

Task Scheduler program to run

In the arguments box, enter the Data Loader Session ID to execute, then click Finish to save the task.

Task Scheduler save basic task

Windows Task Scheduler will now execute the Data Loader session on schedule — check the session log file (specified when saving the session in Data Loader) to view migration progress.

Creating an Advanced Task (Runs Whether User Is Logged On or Not)

Make sure Data Loader is installed and activated under a user with Administrator privileges.

Step 1 — Make sure you've created and saved a session in Data Loader, run it successfully, and noted its Session ID.

Step 2 — Start Task Scheduler in Windows:

  1. Click the Start button
  2. Click Control Panel
  3. Click System and Security
  4. Click Administrative Tools
  5. Double-click Task Scheduler

Step 3 — In the Task Scheduler window, click "Create Task..."

Task Scheduler create advanced task

Name the task "DataLoader" and choose "Run whether user is logged on or not" and "Run with highest privileges."

Task Scheduler advanced task name

Click the Triggers tab and click New to define your interval. Then click the Actions tab, click New, and Browse to C:\Program Files (x86)\Data Loader\DLRun.exe, entering your Session ID in the argument box.

Task Scheduler advanced action

On the Settings tab, choose "Run the task as soon as possible after a scheduled start is missed."

Task Scheduler settings

Click OK to save the task. You can periodically check the session log file to see whether the session ran successfully and whether any errors occurred.