Equinox Online Help - Language Reference - A to Z

Home

ExecuteSetMode

Applies to
SyntaxExecuteSetMode [WaitExpression, WhereExpression, DisplayExpression, PriorityExpression]
Action[Statement] Configures where and how tasks will run using the Execute statement.
ScopeUsuable anywhere.
Notes

This statement configures how the next Execute statement will run. Tasks that are affected by ExecuteSetMode are Method, EmptyDatabase, Export, Import, OptimiseDatabase, OptimiseAllDatabases, Process, Query, Report (Windows environments only), VerifyDatabase, VerifyAllDatabases. After the Execute statement, all ExecuteSetMode parameters are reset to the default, ensuring that subsequent tasks will run locally without referring to the original ExecuteSetMode parameters.

The [WaitExpression] parameter allows you to specify whether to wait for the remote client to finish, and may take one of the following values:

  • -1 Return immediately.
  • 0 Wait and display an hourglass (default).
  • 1 Wait and display the Equinox running dialog.
  • 2 Wait and display a dialog with Halt, Continue and Silent buttons:
    • Halt - halts the remote task
    • Continue - continues after halting
    • Silent - hides the dialog (the task continues running! currently there is no way for an Equinox client to kill a remote task)
  • 3 Work is to take place in a server task while the client displays a dialog and polls it remotely. This only applies to Verify and Optimise tasks

The [WhereExpression] parameter configures where the Execute statement will run. Equinox will run the task in the first place that it is able to. The parameter is a "bit mask", so you may add the following values together to try multiple locations in this order.

  • 1 New remote task (default) - runs the task on the server.
  • 2 New local task - runs the task in another session of Equinox on the local machine.
  • 4 Current task - runs the task in the currently running copy of Equinox.
  • 8 Run the task Locally, as a multiple activity.

Option 1 will only succeed if a remote task licence is available and the server has not reached the limit on remote tasks. Option 2 is only relevant to Equinox 4, its been made obsolete in Equinox 5 and 6. Option 8 is only useable in Equinox 6 or later.

The [DisplayExpression] parameter controls how to display the executed task on Windows environments.

  • 0 Display as a normal task.
  • 1 Minimise the task window.
  • 2 Hide the task window.

The [PriorityExpression] parameter controls the priority given to the task on Windows environments. Unless there is a specific need, the default setting is recommended.

  • 0 Default
  • 1 High priority
  • 2 Medium priority
  • 3 Low priority
CategoryRemote task handling
See Also Execute, ExecuteFalTorPan, ExecuteGetStatus, ExecuteMindMeld, ExecuteSetDataIn, ExecuteSetData, ExecuteSetDataOut, ExecuteWaitForTask
Example

This example runs a process called "proc" as a remote task. It will display the hourglass while it is waiting for the task to be completed and run it on the server. It will be displayed as a normal task with normal priority.

ExecuteSetMode0,1,0,0
Execute process "proc"