Schedule a Command for Execution

16 September 2015

  • Release 9.12 - added.
at (Commands)
TypeCorrade progressive command
Commandat
DescriptionThe at command makes Corrade schedule a command for execution at a later time in the future.
Permissionsschedule
Parametersgroup, password, action
Last ChangesRelease 9.12 - added.

The at command makes Corrade schedule a command for execution at a later time in the future.

Command Required Parameters Required Corrade Permissions Example
at group, password, action schedule
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            "command", "at",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            // Execute on the 16th of September 2015
            // 27 seconds after the UTC hour 6:15am
            "time", "2015-09-16T06:15:27.827875Z",
            // Add a new command to execute.
            "action", "add",
            // The command to execute is encoded in
            // key-value pairs and then sent as data.
            "data", wasURLEscape(
                wasKeyValueEncode(
                    [
                        "command", "tell",
                        "group", wasURLEscape(GROUP),
                        "password", wasURLEscape(PASSWORD),
                        "entity", "local",
                        "message", "GOOD NIGHT!",
                        "type", "normal"
                    ]
                )
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);
Parameter Possible Value Second Parameter Possible Value Description
action add time An LSL Timestamp (with the format YYYY-MM-DDThh:mm:ss.ff..fZ). The time in UTC at which the command will be executed.
data The serialised key-value pair command. The command to be executed.
get index An integer representing a zero-based index of the scheduled command to retrieve. Gets the scheduled command at position index (or the first) in descending order of the current schedules.
remove index An integer representing a zero-based index of the scheduled command to remove. Removes a scheduled command at position index (or the first, if index is not specified) in descending order of the current schedules.
list Lists all upcoming schedules.

Notes

  • For the get and remove action, Corrade first sorts all the schedules in descending order and then based on the supplied index parameter, selects the scheduled command to act upon. The soonest upcoming scheduled command is hence at index 0, whilst the latest scheduled command is at the last index.
  • All times are expressed in UTC following the llGetTimestamp LSL command.
  • The precision for scheduled commands is one second. In other words, scheduled commands may execute one second later than the scheduled time.
  • The scheduled commands are serialised to state/GroupSchedules.state upon adding or removing a schedule and the state file is loaded upon restart which allows Corrade to execute scheduled commands that are expired as soon as the bot logs-in.

secondlife/scripted_agents/corrade/api/progressive/commands/at.txt ยท Last modified: 2017/02/22 18:28 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.