ShellSession

Tue May 19 01:34:41 EDT 2009

This connector executes a command to enter a shell, then uses open/poll/close dialogs to run commands. All the I/O is passed through for processing.

You define the shell command in the "shell" property. For example, on Windows: "Command.exe" On Unix, "/bin/sh".

Note that the executed command will not inherit any shell environment, so if that is necessary, you should wrap your target shell in a shell script/batch file than sets up your environment. You call that script/batch, by directing the command shell to launch it. For example, on Windows: "Command.exe /C MyBatch.bat" On Unix, "/bin/sh -c MyScript.sh"

The present working directory (PWD) of the command is set to the application's home directory. The command shell will be executed as the same O/S user account as the application's.

Dialogs

This plug-in supports three dialogs that can run commands in the shell. The dialogs are configured via three tabs in the Connnector's Advanced tab. All are optional; just leave a dialog empty to skip it. (Contact your support provider for documentation on writing dialogs.)
Open: Runs once, immediately after a successful launch of the shell (gateway startup).
Poll: Runs periodically, according to the "poll" property.
Close: Runs once, just before the shell is terminated (gateaway shutdown).

Polling

The "Poll" dialog is periodically executed, according to the "poll" property. The property's value is either an integer number of milliseconds between polls, or a cron-style schedule string. If you leave the value empty, then polling is disabled.

Cron

Cron is a Unix job-scheduling system for repeating periodic tasks via five fields relating to the time of day/week/month/year. The five fields are as follows:

When entered as the value of the "poll" property, each field is separated by a space character. Each field can contain a single digit, or the following patterns:

Cron Examples:

poll=30 0 * * *
Run the Poll dialog every night at 12:30 AM

poll=0 * * * 1-5
Run the Poll dialog every hour, on the hour, but only on weekdays

poll=* * 1 * *
Run the Poll dialog on the first of the month