Managing and Controlling Direct Mailer Jobs from the Command Line

You can manage a Direct Mailer job from the command line interface by using the Win32 console application DmlRun. Direct Mailer includes a set of command line options that you use with DmlRun. These options enable you to create, run, monitor, and delete Direct Mailer jobs.

For example, to list all your Direct Mailer jobs and review the jobID numbers, you type DmlRun /list. To stop a specific job that Direct Mailer is processing, for example 1456, you type DmlRun /term:1456.

The following table lists the options you can use with DmlRun.

Option Description
/run:<jobID number> Starts a job, or continues a job that was paused.
/term:<jobID number> Stops a job that is running.
/pause:<jobID number> Suspends the job but does not stop it; all the resources remain allocated. Use this option when you want to balance Simple Mail Transfer Protocol (SMTP) server load.
/create:<param-string> Creates a new Direct Mailer job based on the data in your job file. After the job is created, use the /run option to run it.
/delete:<jobID number> Deletes a Direct Mailer job.
/list Lists all Direct Mailer jobs.
/list:[css_site=xxxx;] [filename=yyy;] Enumerates all the jobs for the given Commerce Server site (if specified) or for all sites (if the css_site keyword is omitted). If the "filename" is specified, the output is directed to the specified file. If no directory is specified, the file name is created in the WINNT directory.

To see an example of the job list file format, see Using the /list Option.

/del_old:age Deletes completed jobs older than "age" days.
/wait Optional. You can use this option with the /run, /term, /create, and /execute options. When combined with the /run option, DmlRun waits until the job is finished before it returns the job status back to the console. You can also combine the /wait option with the /create /execute options to cause the same effect.

When you use the /term /wait options, DmlRun waits until the job actually terminates.

Ee799872.note(en-US,CS.10).gif Notes

  • The /wait option must be combined with another option; it cannot be used alone.

  • Using the /wait /term options will return an error statement such as the following: "Error: The job {7f2c6324-6b72-402d-853d-8b1c654ae842} exited with status code 1".
/execute Optional. When you use the /create /execute options, DmlRun creates and runs the job.

You must always include the /create option on a line in which you use the /execute option.

/server:<server name> Optional. You can use this option with any other option. It forces DmlRun to manage the job remotely on the specified server.
/? or /help or /h Provides help for the command line options and usage. You cannot use this option with any other option.

The following options cannot appear on the same command line together:

  • /create

  • /delete

  • /del_old

  • /list

  • /pause

  • /run

  • /term

Using the /list Option

The job list file can be produced by the DmlRun /list:<filename> command. It is a text file in .ini-compatible format. Each job occupies its own section, "Job #" where "#" is a sequential number (from 1 to the total number of jobs). The following is an example extract from the file:

[General]
JobCount=2

[Job 1]
JobID number=<job_id for the job>
Description=<Descriptive text for the job>
Status=<Integer; status code for the job>
LastRunTime=<Date/Time when the job ran last time. Blank if job did not run.>
FinishedTime=<Date/Time when the job was completed. Blank if job did not finish.>
CampaignItem=<Campaign item ID. Appears only if part of a campaign.>
DMLItem=<Direct Mailer item ID. Appears only if part of a campaign.>
CommerceSite=<css_site ID. Blank if not part of a site.>

[Job 2]

See Also

Creating a Direct Mailer Job File

Creating and Running a Direct Mailer Job


All rights reserved.