Chapter 3 Working with Dynamo Web Sites
With PowerDynamo you can schedule a script or template to be executed periodically.
Scheduling script and template execution provides an alternative way of quickly providing to users the results of queries that take a long time to run. It allows the results to be kept up to date, while allowing quick and efficient access from Web clients.
The output of a scheduled script is stored in the Web site and available to users.
For scheduling to take effect:
For scheduling to take effect, the Load
at startup
and Enable scheduling
options
must both be selected for the mapping representing this site. These
options are visible after clicking the Browse button in the mapping property
window.
To schedule a script:
The file containing the script or template is modified to instead contain the output of the document. In this manner, you can change a script or template from on-demand processing to scheduled processing without changing the URL.
The contents of the original script or template are saved in a file with the same name but a changed extension. The extension for script source is sss, while the extension for template source is sts. The source is saved in the same directory as the original script.
The contents of the ssc or stm file are altered to indicate that the contents are pre-generated from a scheduled script or template.
The schedule.ssc document
in the system directory is altered to add a call to site.Schedule()
.
This call adds the scheduled document to the list of scheduled documents.
The schedule.ssc document is imported by autoexec.ssc.
Scheduling with ISAPI or NSAPI servers
Scheduling begins when the first
request for a script has been made to the Web server. ISAPI and
NSAPI Web servers do not load the Dynamo plug-in until it is needed - such
as when the first scheduled script is requested.
You can unschedule previously scheduled documents. This replaces the pre-generated document with the original script or template. The script is then processed on demand, rather than according to a schedule.
To remove a scheduled action:
The script contents are restored to the original
document name, and the source document that was produced when the
document was scheduled is deleted. Also, the site.Schedule()
line
is removed from the schedule.ssc document.
Scheduled actions and SQL Remote
Adaptive Server Anywhere users employing
SQL Remote should ensure that the Personal Web Server at each remote
database is configured so that scheduled actions are not executed.
If scheduled actions take place at both consolidated and remote
databases, replication errors may occur.
Copyright © 1999 Sybase, Inc. All rights reserved. |