Desktop User Guides > Professional > Data management scripting > DMS Runner > Scheduling DMS files > Using the At command to schedule a DMS file
 
Using the At command to schedule a DMS file
The At command schedules commands to run at one or more specified times. The At command provides some scheduling options. This topic provides instructions for scheduling a DMS file to be run once later today and to be run once every day of the week. However, you are not limited to these options. Refer to the Microsoft documentation for full details. (Type Help At at the command prompt for information on the command.)
To open the command prompt
From the Windows Start menu, choose Programs > Accessories > Command Prompt.
To schedule a DMS file to be run later today
1 At the command prompt, type At followed by:
The time you want to run the file. Use this format:
hh:mm
where hh is the hour in 24 hour notation and mm is the minute.
The full location and name of the DMSRun program. By default, this is C:\Program Files\Common Files\IBM\SPSS\DataCollection\<version> DMOM\version\DMSRun.exe. If the location contains spaces, enclose the name and location in quotation marks (" ") .
The full name and location of the DMS file you want to run. If there are any spaces, enclose it in quotation marks. The default sample file locations might exceed the number of characters that are allowed: if necessary, copy the files to a new shorter location.
2 Press Enter.
Example
To run C:\Samples\DMS Files\Cleaning.dms at 4.30pm, enter:
At 16:30 "C:\Program Files\Common Files\IBM\SPSS\DataCollection\<version> DMOM\version\DMSRun.exe" "C:\Samples\DMS Files\Cleaning.dms"
To schedule a DMS file to be run every day
1 At the command prompt, type At followed by:
The time you want to run the file.
/every: followed by the days you want to run the file. For example:
/every:m,t,w,th,f,s,su specifies every day of every week.
/every:m,w,f specifies every Monday, Wednesday, and Friday.
/every:1,11,21 specifies the 1st, 11th, and 21st day of every month.
The full location and name of the DMSRun program.
The full name and location of the DMS file you want to run.
2 Press Enter.
Example
To run C:\Samples\DMS Files\Cleaning.dms at 10:30pm every day, enter:
At 22;30 /every:m,t,w,th,f,s,su "C:\Program Files\Common Files\IBM\SPSS\DataCollection\<version> DMOM\version\DMSRun.exe"
"C:\Samples\DMS Files\Cleaning.dms"
Tips
By default, when the file is run, the processing takes place in the background. If you want to see the DMS file being run, use the /interactive option. You specify this immediately after the time. For example:
At 15:41 /interactive "C:\Program Files\Common Files\IBM\SPSS\DataCollection\<version> DMOM\version\DMSRun.exe" "C:\Samples\DMS Files\
cleaning.dms"
To get help on the At command, type Help At at the command prompt, and then press Enter.
You must include the filename extensions for both DMSRun and the DMS file.
Enclose the filename and location in quotation marks (" ") if there are any spaces.
The default sample file locations might exceed the number of characters that are allowed. If necessary, copy the files to a new shorter location.
You can use a batch file to run multiple DMS files and schedule it for running later. Remember to specify the location and filename extensions. The CategoricalsOnly.bat sample batch file that comes with the UNICOM Intelligence Developer Documentation Library provides an example of a batch file that has been set up so that it can run as a scheduled task. For example, to schedule it to be run at 1.30pm, you could enter:
At 13:30 "[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Scripts\Data Management\Batch\CategoricalsOnly.bat"
When you use the At command to set up tasks that are to be run once only, by default the option to delete them after running is selected. If you want to retain the task, you can deselect this option in the Scheduled Tasks window before the task is run.
See
Scheduling DMS files