Scheduling File Transfers With Robo-FTP |
Top Previous Next |
Part of Robo-FTP’s usefulness is derived from its ability to perform file transfers unattended at scheduled times when running a script.
The Scheduling Script Commands
Scheduling operations within a script file are controlled by using either the PAUSE or CRON script commands.
The PAUSE command is the simplest method and is best suited for scheduling a one-time event. This command results in script execution being suspended for a fixed period of time (e.g., 60 minutes) or until a fixed time of day (e.g., 11PM). At the designated time, the script “wakes up” and performs a series of tasks (e.g., log on to an FTP site, send a file, and log off). If the tasks are to be repeated, the script would loop back to the PAUSE command and wait for the next designated time to arrive.
The CRON command provides much more complex scheduling. This command allows events like “every Tuesday and Thursday at 11PM”, “once a month at midnight of the 5th day”, “every 15 minutes on March 30”, etc., and any combination thereof to be scheduled. To make scheduling with the CRON command more simple, Robo-FTP includes the CronMaker scheduling utility. With CronMaker, you build the "crontab.txt" input file to the CRON command with a few mouse clicks. When the next CRON event triggers, the script “wakes up” and performs a series of tasks (e.g., log on to an FTP site, send a file, and log off). If the tasks are to be repeated, the script would loop back to the CRON command and wait for the next CRON event to trigger.
Launch Robo-FTP running a script with one or both of these commands and the scripted tasks will occur when you want them to.
Using the CRON Command - A Brief Overview
When scheduling task(s) with CRON, there are usually three discrete components that need to be created:
To schedule tasks with CRON, the following step-by-step approach is suggested.
First, create and test the script(s) needed to perform the file transfer tasks at hand. It is important that you test that each script does what you want it to BEFORE subjecting them to a final scheduled environment.
Next use the CronMaker utility to create or edit the event schedule. This process creates an event file (normally named “crontab.txt” that is saved in Robo-FTP’s program files folder). This file is direct input for the CRON command.
To make this all work, launch Robo-FTP with the master script. The master script executes the CRON command which will in turn launch task specific scripts at the scheduled times and then loop back to await the occurrence of the next event.
The following is a sample master CRON script:
There is a similar file named “CronMaster.s” provided with Robo-FTP in the Sample Scripts folder.
Scheduling Dependability When Running as a Windows Service
This scheduling capability is further enhanced by Robo-FTP’s ability to be installed and run as a Windows service. When running as a service, Robo-FTP starts when the system boots up and remains active all the time - you don’t need to remember to start it up every day.
Installing Robo-FTP as a Windows service is easy using the provided SrvInstaller utility. To perform scheduled operations, install Robo-FTP as a service using a suitable script that incorporates either or both of the PAUSE and CRON script commands.
Summary
The combination of Robo-FTP’s scheduling and Windows service capability is a powerful combination to make sure that your file transfers take place dependably when you want them to.
|