...
The feature requires the use of the JSch implementation by JCraft. See How To - Usage of the SSH Job (SOSSSHJob2JSAdapterJobSchedulerSSHJob) with JCraft's JSch for more information about configuring your SSH Job to use the JSch implementation,
...
Code Block |
---|
language | xml |
---|
title | job xml |
---|
collapse | true |
---|
|
<job order="yes" stop_on_error="false" title="Launch commands or executable files by SSH">
<description>
<include file="jobs/SOSSSHJob2JSAdapterJobSchedulerSSHJob.xml"/>
</description>
<params>
<param name="host" value="[HOST]"/>
<param name="port" value="[SSHPORT]"/>
<param name="user" value="[USERNAME]"/>
<param name="password" value="[PASSWORD]"/>
<param name="auth_method" value="password"/>
<param name="command_script_file" value="[PATH_TO_SCRIPTFILE]\test_sleep_90s.sh"/>
<param name="runWithWatchdog" value="true"/>
<param name="cleanupJobchain" value="kill_jobs/remote_cleanup_test"/>
<param name="ssh_job_kill_pid_command" value="kill -9 \${pid}"/>
<param name="ssh_job_terminate_pid_command" value="kill -15 \${pid}"/>
<param name="ssh_job_get_pid_command" value="echo $$"/>
<param name="ssh_job_get_active_processes_command" value="/bin/ps -ef | grep \${pid} | grep \${user} | grep -v grep"/>
</params>
<script java_class="sos.scheduler.job.SOSSSHJob2JSAdapter" language="java"/>
<run_time/>
</job> |
...
Code Block |
---|
language | xml |
---|
title | Job1: ReadPidFileJob |
---|
collapse | true |
---|
|
<job order="yes" stop_on_error="no" title="Launch read pid file command by SSH">
<description>
<include file="jobs/SOSSSHReadPidFileJobJSAdapterSOSSSHReadPidFileJob.xml"/>
</description>
<script java_class="sos.scheduler.job.SOSSSHReadPidFileJobJSAdapter" language="java"/>
<delay_order_after_setback delay="30" is_maximum="no" setback_count="1"/>
<delay_order_after_setback delay="0" is_maximum="yes" setback_count="3"/>
<run_time/>
</job> |
Code Block |
---|
language | xml |
---|
title | Job2: CheckAndKillJob |
---|
collapse | true |
---|
|
<job order="yes" stop_on_error="no" title="Kills orphaned PIDs on the Remote Host for clean up by SSH">
<description>
<include file="jobs/SOSSSHKillJobJSAdapterSOSSSHKillJob.xml"/>
</description>
<script java_class="sos.scheduler.job.SOSSSHKillJobJSAdapter" language="java"/>
<delay_order_after_setback delay="30" is_maximum="no" setback_count="1"/>
<delay_order_after_setback delay="0" is_maximum="yes" setback_count="3"/>
<run_time/>
</job> |
...