LassoScript Utility
Basics Browse Detail

[Event_Schedule]

Tag Link [Event_Schedule] Category Utility
Type Process Source Available Yes
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security Tag
Implementation LDML Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Event_Schedule] schedules a URL to be loaded by Lasso at a specified time in the future or schedules repeated loads of a specified URL.

This tag can be used to execute format files on the local server or to trigger CGIs on remote servers. It can schedule a URL to be loaded immediately or at a specific time in the future. Additionally, it can schedule repeated loads of a URL until a designated end time.

The queue of scheduled events can be viewed and individual events can be modified or deleted in the Monitor > Events section of Lasso Administration.

If a -Start parameter is specified then the first load of the URL will be within a minute of the date and time specified. If no -Start parameter is specified, then the first load of the URL will be within a minute of the tag execution.

If a -Delay parameter is specified then the URL will be loaded and requeued for the specified number of minutes in the future. If no -Delay is specified then the URL will be loaded only once. The URL will continue to be requeued until thedate and time specified in the -End parameter is reached. If no -End parameter is specified then the URL will continue to load indefinitely.

If a -Restart=False parameter is specified then the URL will not be requeued after Lasso Service is restarted. By default, all scheduled URLs will be executed as soon as possible after Lasso Service is restarted.

The optional -Username and -Password parameters specify the username and password that should be used to authenticate the URL load. If specified they will be sent to the specified server in the same format that Web browsers send authentication information to Web servers.

GET parameters can be specified directly within the -URL parameter. If POST parameters or additional MIME headers are required then a format file on the local server which contains an [Include_URL] tag should be scheduled for execution.

Similarly, emails can be sent or periodic server maintenance tasks can be performed by scheduling loads of format files on the local server that perform those tasks. Use of a unique username and password can ensure that these pages will not be loaded by site visitors.

Note: Lasso only guarantees the accuracy of scheduled URL executions within about a minute of the scheduled time. If Lasso Service is shut down, Lasso will execute any events that were supposed to be executed when Lasso Service is restarted. Repeating events will be rescheduled, but any missed repetitions will not be made up.

Syntax

[Event_Schedule: -URL=URL]

[Event_Schedule: -URL=URL, -Start=Start Time]

[Event_Schedule: -URL=URL, -Delay=Minutes]

[Event_Schedule: -URL=URL, -Delay=Minutes, -Restart=False]

[Event_Schedule: -URL=URL, -Start=Start Time, -Delay=Minutes]

[Event_Schedule: -URL=URL, -Start=Start Time, -End=End Time, -Delay=Minutes]

[Event_Schedule: -URL=URL, -Start=Start Time, -Delay=Minutes, -Restart=False]

Parameters

Required Parameters
-URL The URL of the page which should be executed at the time set by the other keyword/value parameters.
Optional Parameters
-Start The date and time at which to execute the event. By default set to the current date and time.
-End The date and time to stop executing a repeating event.
-Delay The number of minutes to delay between repetitions of a repeating event.
-Restart If set to true then the event will be rescheduled after the server restarts. If not set then the event will not be rescheduled. Defaults to False.
-Username An optional username which will be used to authenticate the execution of the scheduled event.
-Password An optional password which will be used to authenticate execution of the scheduled event.

Examples

To schedule a page load:

Use the [Event_Schedule] tag. The following tag adds a page load for a page named PeriodicCleanup.Lasso on the server www.example.com. The page will be loaded every four hours so that periodic server maintenance tasks can be performed.

[Event_Schedule
  -URL='http://www.example.com/PeriodicCleanup.lasso',
  -Delay=240,
  -Restart=True]