Previous Topic: Customize the Runtime Environment for a C Shell ScriptNext Topic: Wake on LAN Jobs


Run a Perl Script on UNIX

You can define a UNIX job to run a Perl script.

To run a Perl script on UNIX

  1. Ask your agent administrator to add the path of the Perl interpreter to the oscomponent.validshell parameter in the agent's agentparm.txt file, as shown in the following example:
    oscomponent.validshell=/usr/bin/sh,/bin/csh,/bin/ksh,/usr/local/bin/perl,/usr/local/bin/bash
    

    Note: If the oscomponent.checkvalidshell parameter is set to false, you do not need to perform the first step.

  2. Specify the name of the Perl script you want to run using the SCRIPTNAME statement, as shown in the following example:
    SCRIPTNAME /bin/cmd1.pl
    
  3. Do one of the following:

Example: Run a Perl Script

This example runs the Perl script named cmd1.pl. The path to the Perl interpreter, /usr/local/bin/perl, is specified in the SHELL statement.

AGENT SUN30RD
SCRIPTNAME /bin/cmd1.pl
SHELL /usr/local/bin/perl
ARGS Hello world
USER guest