...
Unfortunately, this feature is buggy. Both parameters are always empty.
Workaround:
You can configure insert the JobSchedulerExistsFile job as first successor job into the job chain.
Job Chain: ftpReceive.job_chain.xml
...
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/job.xml job] order="yes" stop_on_error="no"> <description> <include file="jobs/[http://www.sos-berlin.com/download/scheduler/jobs/JobSchedulerExistsFile.xml JobSchedulerExistsFile.xml]"/> </description> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script] language="java" java_class="sos.scheduler.file.JobSchedulerExistsFile"/> </job> |
Job: ftpReceive,testprocessSuccessFiles.orderjob.xml
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/job.xml job] order="yes" stop_on_error="no"> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script] language="shell"> <![CDATA[ # here you can do somethimg with the result set echo "FTP RESULT FILES = $SCHEDULER_PARAM_SCHEDULER_SOSFILEOPERATIONS_RESULTSET" ]]> </script> </job> |
Order: processSuccessFilesftpReceive,test.joborder.xml
Code Block |
---|
<?xml version="1.0" encoding="ISO-8859-1"?> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/order.xml order]> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/params.xml params]> <!-- Parameter of the ftpReceive job --> <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param] name="ftp_host" value="ServerA"/> <param name="ftp_port" value="22"/> <param name="ftp_protocol" value="sftp"/> <param name="ftp_user" value="my_user"/> <param name="ftp_password" value="my_pass"/> <param name="ftp_remote_dir" value="/ftp_out"/> <param name="ftp_local_dir" value="/home/my_user/ftp_in"/> <param name="ftp_file_spec" value=".*"/> <span style="color:green"><param name="ftp_atomic_suffix" value="~"/></span> <!-- Parameter of the fileExists job --> <param name="file" value="/home/my_user/ftp_in"/> <span style="color:green"><param name="file_spec" value="[^~]$"/></span> </params> </job>[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/run_time.xml run_time]/> </order> |
NOTICE:
The parameter ftp_atomic_suffix is set with "~".
...