Scheduling Script Operation |
Top Previous Next |
Robo-FTP provides two built-in methods to schedule certain operations. Simple daily scheduling is provided by the PAUSE command. More complex scheduling is provided by the CRON command. In some cases, the commands may be used together. You may also choose to use the Windows Task Scheduler or other external scheduling tool to launch Robo-FTP.exe and specify a command script to execute using the -s command line switch.
Simple scheduling amounts to delaying the execution of script commands for a specified period of time or until a specified time of day. For example, the following script command delays script execution until 2:00AM.
PAUSE /until=2:00
More advanced scheduling enables scripts to be run at on certain days of the week, days of the month, and/or at various times of day. The CRON command is used for this purpose. The CRON command utilizes predefined scheduling conditions (e.g., @daily) or a cron event file (usually named "crontab.txt") that allows for multiple scheduling conditions. For example, the following script command runs a specified script file at midnight each night.
CRON "@daily" 'CALL "nightly.s"'
It is also possible to use the PAUSE and CRON commands together to achieve some of the same results. For example, since the @daily condition becomes active at midnight, you might want to have the script become active at 1:30AM instead of at midnight. To accomplish this, you could use the following script commands.
CRON "@daily" PAUSE /until=1:30 CALL "nightly.s"
More complex scheduling is possible using the CRON script command in conjunction with the cron event file. The format of this file is complex and not something the casual user needs to be concerned with. The CronMaker utility is provided with Robo-FTP for the direct creation and modification of cron event files.
Related command(s): CRON, PAUSE See also: Scheduling File Transfers, Programming Service Scripts, Simultaneous Execution |