Introduction
In this example user want to poll for an incoming file on the ServerA, once file matching with reguler expression is found JobScheduler should transfer the file(s) from ServerA to ServerB.
After successfully transfer of file on ServerB, JobScheduler should start an processing script on ServerB via SSH.
Solution
For such a file transfer and processing workflow, JobScheduler has inbuilt JITL jobs, namely JADE job and SSH job.
Job Chain : FileTransferAndProcessing.job_chain.xml
The job chain FileTransferAndProcessing has two nodes/steps:
Step 1: jade_s2s_file_transfer.job.xml
Step 2: start_proccessing_ssh.job.xml
Job Chain : example
<?xml version="1.0" encoding="ISO-8859-1"?> <job_chain orders_recoverable="yes" visible="yes" title="Tranasfer Data from ServerA to ServerB and start Processing on ServerB vis SSH" max_orders="1" name="DataTransferProcessing"> <job_chain_node state="jade_s2s_file_transfer" job="jade_s2s_file_transfer" error_state="error" next_state="ssh_start_proccessing" on_error="suspend"/> <job_chain_node state="ssh_start_proccessing" job="ssh_start_proccessing" next_state="success" error_state="error" on_error="suspend"/> <job_chain_node state="success"/> <job_chain_node state="error"/> </job_chain>
Jade Job : jade_s2s_file_transfer.job.xml
This job is an JITL job