Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » MobiLink - Server Administration » MobiLink server technology » Central administration of remote databases » Remote tasks


Remote task logic

The following is an outline of the logic used to execute a remote task.

current_command = 1;
num_tries = 0;
loop {
      num_tries = num_tries + 1;
      if( task_success or task_abort ) break EXECUTE_TASK;
      if( task_retry and at maximum tries ) {
            break EXECUTE_TASK;
      } else {

for each command starting at current_command {
      execute current_command;
      if( command failed ) {
            if( action on failure is "abort task" ) {
                  break EXECUTE_COMMANDS, returning task_abort;
            } else if( action on failure is "continue" ) {
                  // no action, continue at next command
            } else if( action on failure is "retry task" ) {
                  current_command = 1;
                  break EXECUTE_COMMANDS, returning task_retry;
            } else if( action on failure is "retry command" ) {
                  // no change to current_command
                  break EXECUTE_COMMANDS, returning task_retry;
      current_command = next command number;
return task_success;

The maximum running time is reset for a task when the task starts and when a command or the entire task is retried because a command fails.

When a command or task is retried because a command fails, the condition is not reevaluated and no new trigger event is required. It is important to consider whether properties referenced in the condition can change during the execution of the task, and whether retrying a command if the condition fails would produced undesirable results.