Although the Data Loader also comes with it's own scheduler but it executes schedule jobs only when the user is logged on to the system. So if you need to execute migration jobs whether user is logged on or not, then you can use Windows Task Scheduler to execute Data Loader migration jobs using Data Loader runtime.
In this article we will see how we can run database migration job
automatically even when the user is logged on or not using Windows Task
Scheduler.
As you may be aware that Data Loader comes with a
separate Data Loader runtime which can be used to execute database migration
jobs from command line. This command line option helps users to execute the
migration job from another program or schedule and run database migration
from Windows.
The syntax for calling Data Loader runtime from command line is given below
DLRUN.exe <session_id> [showoutput]Where :
<session_id> : The session ID which you want to execute.
showoutput : (Optional) If specified then Data Loader will show a output window
Creating a Advance Task (which can run even when the user is logged on or not)
Let's see how we can create a Basic Task in Windows Task Scheduler for running Data Loader Migration Jobs
Step 1
Make sure you have created and saved a Session in Data Loader successfully. If you have not done so, then please first create a Session by choosing your source and target databases and then save and run it and see it's running properly. Also please note down it's Session ID.
Step 2
Start Task Scheduler in Windows
To start Task Scheduler
Step 3
In the Task Scheduler window click on "Create Basic task..." as shown below
Then you will prompted to enter the Name of the task. Enter whatever name you like
After clicking next, you will be asked to choose the interval, choose your desired interval time and click next
Then you will be prompted to choose the task action, choose the first option "Start a program" and click next
In the next screen, click browse button to choose the program this task should run. Navigate to the folder where Data Loader is installed and choose "DLRun.exe" . It's usually located in "C:\Program files(86)\Data Loader 4.8" folder.
In the arguments text box, you will need to enter the Data Loader Session ID which you want to execute.
Next, click Finish button to save the task.
Once you save it the Windows Task Scheduler will execute the Data Loader Session and you can check the Session Log file to view the progress of migration. Remember you specify the Session Log file name while saving the Session in Data Loader.
Make sure you have installed and activated Data Loader under a user who has Administrator privilege.
Step 1
Make sure you have created and saved a Session in Data Loader successfully. If you have not done so, then please first create a Session by choosing your source and target databases and then save and run it and see it's running properly. Also please note down it's Session ID.
Step 2
Start Task Scheduler in Windows
To start Task Scheduler
Step 3
In the Task Scheduler window click on "Create task..." as shown below
Enter the name of this task as "DataLoader" and choose the "Run whether user is logged on or not" and "Run with highest privileges" option as shown below
Next Click on Triggers tab and click New button to define your interval
Next Click on Actions tab and click "New.." button and click Browse button to choose "C:\Program Files(86)\Data Loader\DLRun.exe" and in the argument box enter your Session ID
Next click on Settings tab and choose the "Run the task as soon as possible after a scheduled start is missed" checkbox
Click OK to save the Task.
You can periodically view the Session Log file to see the progress of Session. Whether Session has run successfully or not and whether any errors have occurred or not.