Create a Script Job Definition

A Script job defines a set of commands to run on the ECX appliance. Use the Script job feature to add functionality to ECX.

A Script job includes a user-defined script as well as other job parameters.

A script can consist of one or many commands, such as a shell script. Command entries may include any entry that is valid for a Linux CentOS command shell. The author of the script must be familiar with the command, options, and parameters.

As the script runs, ECX interprets a return code of 0 as success and subsequent values as follows:

  • Return codes 1-125 indicate a failure, the meaning of which is specific to the command or shell script invoked
  • Return code 126 indicates the script command was found but is not executable
  • Return code 127 indicates that the script command was not found
  • Return codes 128-255 indicate that the command abnormally terminated. The formula 128+N is used with N representing the signal the process terminated on
  • Values outside the range of 0-255, in both negative and positive values, are wrapped around the same series of return codes and are matched to a corresponding code. When positive error codes display over 255, they read as follows: 256=0, 257=1, 258=2, etc. When negative return codes display, the corresponding codes are as follows: -1 = 255, -2 = 254, -3 = 253, etc.

 

BEFORE YOU BEGIN:

  • Ensure that the applications and programs called from your script are properly configured.
  • Ensure that paths are properly set up.
  • Ensure that authentication is properly set up.
  • Ensure that schedules, SMTP providers, and other relevant providers are added in ECX. See Create a Schedule and Register a Provider.

To create a Script job definition:

  1. Click the Jobs Monitor tab icon tab. Expand the System folder, then select Scripts Scripts icon .
  2. Click New New icon, then select Script. The job editor opens.
  3. Enter a name for your job definition and a meaningful description.
  4. Enter the first command of your script in the command text box, and optionally enter a tag or remark in the corresponding description text box. Then click Add Add Node icon .
  5. Continue to add commands. Use the reorder, edit, and delete options to assist you. Your script can consist of one or many commands.
  6. To create the job definition using default options, click Create Job. The job can be run manually from the Jobs Monitor tab icon tab.
  7. To editoptions before creating the job definition, click Advanced. Set the job definition options.
  8. Run scripts in order
    Select Run scripts in order for the commands in the job to run sequentially. The job runs the first command and when it finishes it runs the next one. Clear this option for the commands to run concurrently.
    Stop execution on failure
    Select Stop execution on failure for the job to stop running as soon as one of the commands fails. Clear this option for the job to continue to run after one of the commands fails. This option is only applicable if Run scripts in order is selected.

  9. Optionally, expand the Notification section to select the job notification options.
  10. SMTP Server
  11. From the list of available SMTP resources, select the SMTP Server to use for job status email notifications. If an SMTP server is not selected, an email is not sent.
  12. Email Address
  13. Enter the email addresses of the status email notifications recipients. Click Add Add Node icon to add it to the list.
  14. Optionally, expand the Schedule section to select the job scheduling options. Select Start job now to create a job definition that starts the job immediately. Select Schedule job to start at later time to view the list of available schedules. Optionally select one or more schedules for the job. As each schedule is selected, the schedule's name and description displays.
  15. Note: To create and select a new schedule, click the Configure Configure tab icon tab, then select Schedules Schedule icon. Create a schedule, return to the job editor, refresh the Available Schedules pane, and select the new schedule.
  16. When you are satisfied that the job-specific information is correct, click Create Job. The job runs as defined by your schedule, or can be run manually from the Jobs Monitor tab icon tab.
  17. Note: If you selected the Start job now option, the job runs.

NEXT STEPS:

  • If you do not want to wait until the next scheduled job run, run the job session on demand. See Start, Pause, and Hold a Job Session.
  • Track the progress of the job session on the Jobs tab. See Monitor a Job Session.
  • If notification options are enabled, an email message with information about the status of each task is sent when the job completes.

 


Catalogic ECX™ 2.9

© 2019 Catalogic Software, Inc. | All rights reserved. | 4/17/2019

MySupportKnowledge Base | Trademarks | info@catalogicsoftware.com