以下是对用于执行远程任务的逻辑的简介。
current_command = 1; num_tries = 0; EXECUTE_TASK: loop { num_tries = num_tries + 1; EXECUTE_COMMANDS; if( task_success or task_abort ) break EXECUTE_TASK; if( task_retry and at maximum tries ) { break EXECUTE_TASK; } else { continue; } } EXECUTE_COMMANDS: 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; |
任务启动时以及由于命令失败而重试命令或整个任务时,将重置任务的最长运行时间。
当由于命令失败而重试命令或任务时,不会重新评估条件并且无需新的触发器事件。请认真考虑,条件中引用的属性是否可以在任务执行过程中发生更改,以及在条件失败后重试命令是否会产生不期望的结果。
![]() |
使用DocCommentXchange讨论此页。
|
版权 © 2013, SAP 股份公司或其关联公司. - SAP Sybase SQL Anywhere 16.0 |