[Perl] Execute
Q100089: [Perl] Execute
Runs a Perl file or command(s). Requires the installation of a Perl runtime environment if not already installed.
Parameter | In/Out | Description | Other Info |
---|---|---|---|
Command to execute | In | A list of Perl commands, separated by newlines, to run. | |
File to execute | In | Perl file to execute. | |
Options | In | Perl command line switches. | |
Log output level | In | Choices: Minimal , Verbose The level of execution detail you want to appear in the log. |
Default: Minimal |
ExitCode | Out | The exitcode returned by the process. | |
OutputText | Out | The output text created by the process. | |
Error | Out | The error reported by the process, if any. |
(Italics = required parameter)
Notes
The [Perl] Execute
module is built to allow a quick and easy way to execute a Perl script (.pl) as a step in a job definition. Since the Perl runtime is not an intrinsic component to Microsoft Windows, the use of this module will require the installation of a third-party package in order to be of use. To install a compatable Perl runtime, install the perl environment from Strawberry Perl. When this package has been installed on the JobServer.NET server, the [Perl] Execute
module knows how to locate and utilize the package. All that is necessary is to install the standard Strawberry Perl package for Microsoft Windows.
There are two primary ways to run your Perl code or scripts with the [Perl] Execute
module. The difference is only determined by if you just have a small number of Perl commands you with to execute, or if you have a file full of Perl code. If you just have a few commands to run, then you can insert them into the Command to execute
parameter. This parameter can take a list of commands, but each command must be separated by at least a newline character. This is basically the same requirement that a file, or script, would also have. The other option would be to provide the fully qualified path and filename to a Perl script using the File to execute
parameter. Only one of the Command to execute
or the File to execute
parameters should be provided.
The Options
parameter allow you to specify additional command line switches to the Perl runtime environment.
Important Note on Running Perl Scripts
It is important to note that many Perl scripts do rely on other external components. If the Perl script you are trying to execute was not written by you, make certain that it runs corrently on the Windows Server once you have the perl environment from Strawberry Perl installed. Run it stand-alone outside of the JobServer module and make certain it works this was as expected first. If it does not, then the script may have other external dependencies that would have to be rectified first.