# Script Library

Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.

## cron_for_pause.s

Download

A typical requirement for a script is to perform a series of commands, wait a certain amount of time, then repeat.

A simple way to do this is to use the PAUSE command like this:

 PAUSE /for=3600


That command would pause Robo-FTP for 3600 seconds (one hour).

However, scheduling requirements are often more complex. Some typical additional requirements might include:

• Only run during business hours (8am until 5pm)
• Only run Monday through Friday

The CRON command can be used instead of PAUSE to handle these additional requirements.

This sample script uses CRON to pause script execution for 30 minutes, perform a series of uploads and downloads, then repeat.


1  :top
2  CRON "*/30 8-17 * * 1-5" ""
3  ;; The above line will cause the script to run every 30
4  ;; minutes during business hours (8am-5pm, Mon-Fri)
5
6  FTPLOGON "EDI Server"
7
8  ;; Outbound
9  FTPCD "/send"
10  WORKINGDIR "c:\out"
11  SENDFILE "*.mss" /delete
12
13  ;; Inbound
14  FTPCD "/received"
15  WORKINGDIR "C:\in"
16  RCVFILE "*"
17
18  FTPLOGOFF
19  GOTO top
20



Browse complete list of scripts