RSCMDCANCEL        Cancel a non-blocking remote server command

Top  Previous  Next

Syntax:

RSCMDCANCEL

[ /options ]

Arguments:

None

 

Options:

/timeout=xx

Time-out, in seconds, to wait for the command to Complete (if omitted the time-out is set to 30 seconds).

 

 

This command requires the server be the Robo-FTP Server from Serengeti Systems.

 

This commad may be used to cancel non-blocking remote server command(s) issued by Robo-FTP using the RSCMD script command for execution by Robo-FTP Server.

 

Important

Remote server commands are only permitted using Robo-FTP in concert with its companion Robo-FTP Server product - both products of Serengeti Systems Incorporated.

 

Individual commands submitted to the server (e.g., PGPENCRYPT, ZIP) cannot be cancelled - this command should only be used to cancel the execution of a server-side script that was launched using a CALL or CHAIN command via the RSCMD script command.

 

If the server-side script does not complete in a manner expected by Robo-FTP then you could cancel it as shown below. The RSCMDCANCEL command initiates a cancellation process and returns immediately. Your script should call RSCMDSTATUS thereafter until a completion status is reported. Intervening RSCMD or RSCMDCANCEL commands are not permitted until the cancel operation completes.

 

RSCMDCANCEL

IFERROR!= $ERROR_SUCCESS GOTO cancel_failed

:cancel_loop

;;delay script for one second

PAUSE /for=1

RSCMDSTATUS

IFERROR!= $ERROR_SUCCESS GOTO cancel_loop

 

Be aware on some occasions the server-side script cannot be immediately cancelled (e.g., the script is in the middle of an non-cancellable operation like zipping, unzipping, encrypting, or decrypting a file) so your script needs to accommodate a waiting period as shown in the example above.

 

The /timeout option is usually not necessary. There is a default time-out of 30 seconds on the return of the RSCMDCANCEL command. In rare cases where a normal (non-error) return takes more than 30 seconds, use this option to specify a time-out period that better suits your environment.

 

Related Command(s): RSCMD , RSCMDSTATUS