Scheduling Script Operation

Top  Previous  Next

 

FileLink provides two build-in methods to schedule when certain operations are performed. 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.

 

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 to this purpose. The CRON command utilizes predefined scheduling conditions (e.g., @daily) or a file (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 “crontab.txt” 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 FileLink for the direct creation and modification of “crontab.txt” files.

 

Refer to CRON and PAUSE for more details.