* Caché Auto FTP

Automatically Launch FTP tasks at User Specified Dates and Times

Although FTP is a dated technology, it continues to be useful for moving textual data files, image files, and video files between systems behind firewalls.  This FTP utility allows for unlimited numbers of scheduled FTP tasks for authorized Caché users, and it includes advanced features such as optional email notifications when a task takes too long or fails, ability to terminate jobs running FTP tasks, output for the last 30 runs from a pull down list for each scheduled FTP task, renaming of local and/or server files after being sent, renaming of local and/or server files after being received, date wildcards for all file names, etc. (see demo video and screen prints below). 

* XML based scheduling and FTP task launching utility for all versions of Caché and all Caché based products such as Ensemble, DeepSee, HealthShare, TrakCare, etc. (uses Intersystems' class %Net.FtpSession).

* Display of a selected FTP task shows the process number when it is running and also shows when the process is not running.  Additionally, a window has a dropdown list for the output of the last 30 runs and each selected run shows the output from the task and whether or not there were any runtime errors.  When the task is running, there is an option to terminate the process (with a safety checkbox that must be checked to allow termination).

* For a task to run, the repeat minutes must be greater than zero and the next scheduled run time is displayed for each non-zero selected task.  The repeat task range is from once every minute to once every 99999 minutes (more than 69 days).  To run the same FTP task each week day, schedule it 5 different times beginning once on each week day, each with a repeating setting of 10,080 minutes (1 week).  If you only want to run the task once, schedule the repeat for a large number of minutes, and after it has run, set it to zero to keep the task in the list or delete it if the task isn't likely to be needed again.

* Optional Email notification when a FTP task is started and if an FTP task has any error (no connection, file not found, etc.) or runs longer than the user specified limit.

* All selections are global, so all authorized users can add, view, and modify FTP tasks on the one ftp schedule list. 

* Repeating FTP tasks will not relaunch if the task is currently running.  As soon as a long running FTP task completes, that overdue scheduled task is immediately launched.

* US/UK date display option.

* Edit mode and Watch mode for the web page is available.  In Watch mode the page refreshes every 5 seconds and shows all FTP tasks in a table, with the running FTP tasks at the top of the table in default column sort of process id.  The name of the FTP task is shown, the next launch time, and the process number if the task is currently running.  Each column header can be clicked on to sort by that column.  There is a "Watch" button to put the page in Watch mode and a "Stop Watching" button to put the page back into edit mode.  Also, clicking on the name of any task in the table will put the page in edit mode for that task.

* Date wildcard option for all 4 filename fields - use the following formats in any order/combination with or without other characters within one set of braces per file name (click on screen print below to see example):

    YYYY for year

    mm for month

    dd for day

    HH for hour

    MM for minute

    ss for second

    Examples:     SomeFilename[YYYY-mm-dd HH:MM:ss].txt

                       AnotherFile[mmddYYYY HHMMss].xml

                       AFile[YYYY].txt

                       [YYYYmmdd]file.txt

 

* NOTE:  When fields are blank (directory name fields and rename fields), they are not used for the ftp process. 

* Technical Notes - 1. The background job that automatically launches (if not already running) from the FTP Schedule web page stores its process ID in a local variable and while in an infinite loop that runs every 5 seconds. checks that its process ID matches what the web page stores in a global.  If the web page changes the global by launching a new background job when the user clicks on the "Stop and Restart Background Job" button, the first background job quits because the process ID in the local variable no longer matches the global.  This prevents ever having more than one background job running.  Use this button whenever Cache has been restarted for a fresh background process.  

2.  There is no time drift - every time a job is launched, the scheduled run time is calculated from the original time and not from the last time the job was run.  So the 100th time a job is run, it is 100 X the repeat minutes added to the original scheduled date and time to get the scheduled time for the 100th run, etc.

3.  As of February 24, 2013, all file types can now be FTP'ed, including image files, video files, etc.

Link to fully-functional FREE software (Google Drive - January 2020) - Import into any namespace, compile (with the cf flags if installed previously) from the Caché Import Classes page, and then access the following URL:

http://[Caché Server Name or IP]:[Web port number]/csp/[namespace installed]/SimpleCacheBackups.ScheduleFTP.cls

Click on image to see FTP scheduling page details in edit mode (browser zoom here is less than 100% to fit more info into this screen print):

Click on image to see FTP scheduling page in watch mode:

Demo Video for Cache Auto FTP (February 24,2013 - now supports image and video files as well as text files so the file sizes that are different on February 23, 2013 in this video would now be the same with the new software update):