# azure-batch

> Microsoft Azure Batch Service Client Library for node

Latest version **9.0.0** (published 2020-04-02) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install azure-batch
pnpm add azure-batch
yarn add azure-batch
bun add azure-batch
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 9.0.0 |
| Published | 2020-04-02 |
| First published | 2016-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1174 |
| Author | Microsoft Corporation |
| Maintainers | windowsazure |
| Keywords | node, azure |

## Links

- npm: https://www.npmjs.com/package/azure-batch
- Repository: https://github.com/Azure/azure-sdk-for-node
- Homepage: http://github.com/Azure/azure-sdk-for-node
- Issues: http://github.com/Azure/azure-sdk-for-node/issues
- npm.io page: https://npm.io/package/azure-batch

## Dependencies (4)

- [moment](https://npm.io/package/moment.md) ^2.22.2
- [ms-rest](https://npm.io/package/ms-rest.md) ^2.3.4
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [ms-rest-azure](https://npm.io/package/ms-rest-azure.md) ^2.5.6

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 9.0.0 (latest) — 2020-04-02
- 8.0.0 — 2019-08-21
- 7.0.0 — 2019-06-13
- 6.0.0 — 2019-01-16
- 5.0.0 — 2018-12-13
- 4.1.0 — 2018-11-07
- 4.0.1 — 2018-08-30
- 4.0.0 — 2018-08-25
- 3.2.2 — 2018-06-12
- 3.2.1 — 2018-04-23
- 3.2.0 — 2018-04-03
- 3.1.1 — 2018-03-29
- 3.1.0 — 2018-03-19
- 3.0.0 — 2017-10-11
- 2.2.0 — 2017-09-28
- … 12 more at https://npm.io/package/azure-batch/versions

## README

---
uid: azure-batch
summary: *content

---
# Microsoft Azure SDK for Node.js - Batch Service

This project provides a Node.js package that makes it easy to work with Microsoft Azure Batch Service. Right now it supports:
- **Node.js version: 6.x.x or higher**

Please check details on [API reference documents](http://azure.github.io/azure-sdk-for-node/azure-batch/latest/).

## How to Install

```bash
npm install azure-batch
```

## How to use

### Authentication

 ```javascript
 var batch = require('azure-batch');

 //user authentication
 var credentials = new batch.SharedKeyCredentials('your-account-name', 'your-account-key');
 ```

### Create the BatchServiceClient

```javascript

var client = new batch.ServiceClient(credentials, 'your-batch-endpoint');
```

## List all Jobs under account

```javascript
let options = {}
options.jobListOptions = { maxResults : 10 };

function loop(nextLink) {
  if (nextLink !== null && nextLink !== undefined) {
    return client.job.listNext(nextLink).then((res) => {
      console.dir(res, {depth: null, colors: true});
      return loop(res.odatanextLink);
    });
  }
  return Promise.resolve();
};


client.job.list(options).then((result) => {
  console.dir(result, {depth: null, colors: true});
}).then((result) => {
  return loop(result.odatanextLink);
}).catch((err) => {
  console.log('An error occurred.');
  console.dir(err, {depth: null, colors: true});
});
```


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-node%2Flib%2Fservices%2Fbatch%2FREADME.png)

---
_Source: https://npm.io/package/azure-batch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
