I. Overview
1. Version
Designer | JAR | New Feature |
---|---|---|
10.0 | 2020-08-03 | Added SFTP upload file option in the "Processing" step of the task schedule |
2. Application scenario
Files such as Excel and Word generated by scheduled tasks need to be uploaded to the SFTP server.
3. Function introduction
When the template is selected for the object type in the "Scheduling Object" step, users are supported to upload files using SFTP, as shown in the following figure:
II. Steps
1. Configure SFTP server
Please refer to: Linux system configuration uses SFTP or Windows system configuration uses SFTP. The example in this article is that the SFTP server is in a Windows system.
2. Add a task
Enter the decision-making platform as an administrator, click Manage>Task Schedule>Add a Task to add a timed scheduling task. As shown below:
3. Basic settings
Fill in the task name as SFTP_test, select the platform user Anna in the "Default User Group", and click OK. As shown below:
4. Scheduling object
Click Next, select the template GettingStartedEN.cpt, and select excel03, excel07, word, pdf in "Accessory Archive", as shown in the following figure:
5. Scheduling cycle
Click Next without making changes. As shown below:
6. File process
Click Next, check SFTP Upload File for the processing method, fill in the relevant settings according to the actual situation, and click Save. As shown below:
The introduction of each setting item is shown in the following table:
Setting | Description |
---|---|
Server address | SFTP server IP |
Port | SFTP server port |
Save path | Save path of files generated by scheduled tasks Windows: If the SFTP server is in a Windows system, the "save path" is a relative path, that is, the path starting from the root directory of the SFTP server. For example, the root directory of the SFTP server is: D:\freeSSHd\files, and you want the files to be uploaded to D:\freeSSHd\files, "save path" is / Note: For the introduction of the root directory of the SFTP server, please refer to section IV.4 of the Windows system configuration uses SFTP document Linux: If the SFTP server is in a Linux system, the "Save path" is an absolute path. |
Username | Username of the SFTP server |
Password | Password of the SFTP server Enter the password directly: Enter the username and password directly in the text box on the right. Upload the key file: Click the key icon to upload the key file. 1) If you choose to upload the key file, you need to close the file upload verification button. 2) If you choose to upload the key file, after switching the file server mode in the cluster environment, you need to copy the webroot folder under the project %FR_HOME%\webapps to the root directory of the file server, so that the scheduled tasks can be executed normally. |
7. Preview effect
The files generated by the scheduled task have been uploaded to the "save path". As shown below: