Table of Contents

Search

  1. Preface
  2. Workflow Manager
  3. Workflows and Worklets
  4. Sessions
  5. Session Configuration Object
  6. Tasks
  7. Sources
  8. Targets
  9. Connection Objects
  10. Validation
  11. Scheduling and Running Workflows
  12. Sending Email
  13. Workflow Monitor
  14. Workflow Monitor Details
  15. Session and Workflow Logs
  16. Session Properties Reference
  17. Workflow Properties Reference

Command Task

Command Task

You can specify one or more shell commands to run during the workflow with the Command task. For example, you can specify shell commands in the Command task to delete reject files, copy a file, or archive target files.
Use a Command task in the following ways:
  • Standalone Command task.
    Use a Command task anywhere in the workflow or worklet to run shell commands.
  • Pre- and post-session shell command.
    You can call a Command task as the pre- or post-session shell command for a Session task.
Use any valid UNIX command or shell script for UNIX servers, or any valid DOS or batch file for Windows servers. For example, you might use a shell command to copy a file from one directory to another. For a Windows server you would use the following shell command to copy the SALES_ ADJ file from the source directory, L, to the target, H:
copy L:\sales\sales_adj H:\marketing\
For a UNIX server, you would use the following command to perform a similar operation:
cp sales/sales_adj marketing/
Each shell command runs in the same environment as the Integration Service. Environment settings in one shell command script do not carry over to other scripts. To run all shell commands in the same environment, call a single shell script that invokes other scripts.