Try our new documentation site (beta).

Aborting Jobs

Jobs that are running on a Compute Server can be aborted by using the abort command. For example:

> grbcluster --server=server1 --password=admin abort e7022667

The following steps illustrate how you would start and subsequently abort a job. First, use the Gurobi command-line tool (gurobi_cl) to start a long-running optimization job on your Compute Server:

> gurobi_cl --server=server1 --password=pass glass4.mps

Once the job starts, you can use the grbcluster jobs command to retrieve the associated JOBID (or you can read it off from the output of gurobi_cl):

> grbcluster --server=server1 --password=pass jobs
8f9b15d9 server1 RUNNING     2017-10-10 17:30:33 0

The full or short JOBID can be used to abort the job as follows

> grbcluster --server=server1 --password=admin abort 8f9b15d9
If no JOBID is specified, the most recently started job will be aborted.

After the abort command is issued, the status of the job can be retrieved using the recent command:

> grbcluster --server=server1 --password=pass recent
8f9b15d9 server1  ABORTED 2017-10-10 17:41:33 user1 OPTIMAL
As you can see, the status of the job has changed to ABORTED.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.