Transfer commands are one example of Globus CLI tasks that run in the background. These tasks may result in an email being sent to the initiator upon the task completion, but in order to learn about the task status or interact with it in the shell where it was issued, a user must use one of the globus task commands.

globus task list

The globus task list command prints a list of the most recent Globus CLI tasks initiated by the current user, including their status. It has the form:

globus task list [options]

The command has numerous options to filter its results based on the task's type, status, request or completion time and label text. Other options can limit the output or format it as JSON.

globus task show

The globus task show command displays information about a specific Globus CLI task such as a previously initiated transfer. It has the form:

The command has a few options that control the format of its output. The required taskid argument should be the value printed after a transfer command (or other CLI task command) has been initiated. In this example, a transfer is requested and its status is then requested.


$ globus transfer $gte1:/share/godata/file1.txt $gte2:file1.txt
Message: The transfer has been accepted and a task has been created and queued for execution
Task ID: 01dd1d6a-89e9-11e8-95c4-0a6d4e044368

$ globus task show 01dd1d6a-89e9-11e8-95c4-0a6d4e044368
Label:                   None
Task ID:                 01dd1d6a-89e9-11e8-95c4-0a6d4e044368
Is Paused:               False
Type:                    TRANSFER
Directories:             0
Files:                   1
Status:                  SUCCEEDED
Request Time:            2018-07-17 17:44:09+00:00
Faults:                  0
Total Subtasks:          2
Subtasks Succeeded:      2
Subtasks Pending:        0
Subtasks Retrying:       0
Subtasks Failed:         0
Subtasks Canceled:       0
Subtasks Expired:        0
Completion Time:         2018-07-17 17:44:11+00:00
Source Endpoint:         Globus Tutorial Endpoint 1
Source Endpoint ID:      ddb59aef-6d04-11e5-ba46-22000b92c6ec
Destination Endpoint:    Globus Tutorial Endpoint 2
Destination Endpoint ID: ddb59af0-6d04-11e5-ba46-22000b92c6ec
Bytes Transferred:       4
Bytes Per Second:        3
globus task cancel

The globus task cancel command cancels an active Globus task such as a previously initiated transfer. This can be useful when the failure of one transfer command implies that a sequence of operations cannot proceed and other active transfers should be aborted. Note that when transfers are not succeeding as expected they are repeatedly retried until successful. For this reason, when there is no longer an expectation that a transfer will succeed, it should be canceled. The command can have one of the following forms:

The command must either include a single taskid argument or the --all option, which will cause all active tasks to be canceled. Both tasks that are pending and currently executing will be canceled.

In this example, a single transfer task is started and then canceled. The task cannot be completed because the named source file ("foo") will not be found. The task list is shown before and after canceling (the rightmost list columns were removed for clarity).

 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Inclusivity Statement