Skip to end of metadata
Go to start of metadata

 

Basic information

Package: com.suncode.plugin.ftp.task.DownloadFilesFromFTPTask

Category: FTP

Available from version: 1.0.1

Requirements

Correct configuration of the connection with the FTP server. On the Plug-in configuration tab

Description

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.

Configuration parameters
Parameter namefrom versionDescriptionThe type of the parameterNotes and Restrictions
Configuration file1.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.

StringDescription of the Plug and FTP connection configuration
Path to directory1.0.1Path to the directory on the server from which the files will be downloaded. Subdirectories are ignored.String 
Local directory1.0.1Path to the local directory where documents downloaded from the FTP server will be saved.String 
Delete the downloaded files from the FTP server1.0.1true - Deletes files on the FTP server after downloading them. If the user has such rights. false - files remain on the FTP server.BooleanDeletes when the file is successfully downloaded and the user has permission to delete documents on the FTP server.
Overwrite existing files1.0.1true - 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.BooleanWhen 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.
Tablea in the database: "pm_plus_ftp_modification_time"
Columnfrom versionDescriptionColumn typeNotes and Restrictions
id1.0.1The primary key of the tableLiczbowyAutomatic value generation
task_id1.0.1Scheduled task IDLiczbowyUnique value, no nulls
task_name1.0.1Scheduled task nameTekstowyUpdated with the date update
last_modification_time1.0.1Modified date of the most recent file downloaded to the local servertimestampAll ftp server files that have a later date than this will be downloaded

 

 

Sample configuration

An example of a Scheduled Task

Example of pm_plusftp_modification_time table in database

Change log

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.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.