Almost all Control-M utilities are specified using the command line. If a command invoked from the agent computer contains embedded spaces, add \" after the first quote at the beginning of the command, and add \" at the end of the command (but prior to any parameters).
EXAMPLE: "\"d:\program files\bmc software\control-m agent\exe\_sleep\" 200"
Agentless job submission is supported, so when submitting and executing jobs on computers, resident Control-M/Agent does not need to be installed. These agentless computers are referred to as remote hosts.
For UNIX, consider the following:
em cli [-U <emUser> -P <emPass>) | -PF <password file>}] -H <Server Name> [‑T <timeout in seconds>] [‑DDMM] [-BY_FORCE]
[ACTION_REASON <reason for taking an audit action> [ACTION_NOTE <descriptive reason for audit action>] <cmd> <cmd> ...
EXAMPLE: ctmcreate ...-cmdline "ls -l ’$HOME’"ctmcreate ...-cmdline "ls -l ’$HOME’"
ctmcreate -TASKTYPE COMMAND -jobname servertest -cmdline "ctmvar -action set -var '%%#\DELETEME' -varexpr to_be_deleted"
When this command is invoked from Control-M/Agent, the back-slash before DELETEME may be "eaten" by the shell. To avoid this problem, add a back-slash before the special character that causes the problem (in this case, the original back‑slash). When invoking the ctmcreate utility or ctmdefine utility from Control-M/Agent with a date_ref of $$$$, put a back-slash before each $ as shown here:
ctmcreate -TASKTYPE COMMAND -cmdline ls -incond a '\$\$\$\$' AND ...
Parent Topic |