10.2 Running Command Scripts on Remote Client Systems Using spacecmd

To run a command on client systems, use the system_runscript command, for example:

spacecmd {SSM:0}> system_runscript group:group3 -s 20150617T0130 -t 60 -f /root/myscript

User:       root
Group:      root
Timeout:    60 seconds
Start Time: 20150617T01:30:00

Script Contents
---------------
#!/bin/sh
yum update

Systems
-------
svr2.mydom.com
svr3.mydom.com

Is this ok [y/N]: y
INFO: Action ID: 343
INFO: Scheduled: 2 system(s)

To specify the date and time when an event should start, use the format YYYYMMDD[hhmm] with the -s option. If you do not specify a start time, Spacewalk assumes 0000 (midnight).

The -t option defines a timeout for a client to confirm that it has run a command. After this time has elapsed, Spacewalk assumes that the command has failed.