Package: com.suncode.plugin.ftp.task.DownloadFilesFromFTPTask
Category: FTP
Available from version: 1.0.1
Correct configuration of the connection with the FTP server. On the Plug-in configuration tab
The job downloads the latest files from the FTP server to a local directory. Files can be overwritten or added as new files with a changed name. Tasks also allows you to delete downloaded files from the FTP server, provided that the user (which you are logging in to) has the right to do so. Only files in a given directory on the server are downloaded (directories are not searched or downloaded). After downloading the files, the task saves the latest date of the modified file on the FTP server in the local database and the next task firing downloads newer files from that date. If you want to retrieve files with an earlier date, you must edit the table entry in the database before running this task.
Parameter name | from version | Description | The type of the parameter | Notes and Restrictions |
---|---|---|---|---|
Configuration file | 1.0.1 | The name of the configuration file from the plug-in configuration management plug-in panel, which contains configuration information regarding the connection to the server. NOTE: Changing the name of the configuration file affects the date from which documents will be downloaded. In the case of a new configuration, all files from the server will be downloaded. For a configuration that was previously used in this task, files will be downloaded from the last run date under the specified configuration. The second key affecting the date is the scheduled task id (each task has its own calendar). In other words, the task_id and config_id columns are a composite key in the table. | String | Description of the Plug and FTP connection configuration |
Path to directory | 1.0.1 | Path to the directory on the server from which the files will be downloaded. Subdirectories are ignored. | String | |
Local directory | 1.0.1 | Path to the local directory where documents downloaded from the FTP server will be saved. | String | |
Delete the downloaded files from the FTP server | 1.0.1 | true - Deletes files on the FTP server after downloading them. If the user has such rights. false - files remain on the FTP server. | Boolean | Deletes when the file is successfully downloaded and the user has permission to delete documents on the FTP server. |
Overwrite existing files | 1.0.1 | true - Overwrite existing files on local disk. false- If the given file is on the disk, I add a number to the end in the name of the file. | Boolean | When we download documents that are already in the local directory, then (if the "Overwrite existing files" parameter is set to false) they will be saved with consecutive numbers in the name, e.g. file.txt, file (1) .txt, file (2) .txt, (3) .txt file. |
Column | from version | Description | Column type | Notes and Restrictions |
---|---|---|---|---|
id | 1.0.1 | The primary key of the table | Liczbowy | Automatic value generation |
task_id | 1.0.1 | Scheduled task ID | Liczbowy | Unique value, no nulls |
task_name | 1.0.1 | Scheduled task name | Tekstowy | Updated with the date update |
last_modification_time | 1.0.1 | Modified date of the most recent file downloaded to the local server | timestamp | All ftp server files that have a later date than this will be downloaded |
An example of a Scheduled Task
Example of pm_plusftp_modification_time table in database
1.0.1 (applicable documentation)
- Create a scheduled task
1.0.6
adding an assertion to check the existence of a directory on the server
1.0.7 (applicable documentation)
- Adding a config_id column in pm_plusftp_modification_time table.
1.0.8
- Removing NOT NULL constraint from config_id column in pm_plusftp_modification_time table. Fixing broken upgrader.
0 Comments