Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Latest commit

 

History

History
46 lines (30 loc) · 910 Bytes

README.md

File metadata and controls

46 lines (30 loc) · 910 Bytes

gcr-jobs

This project is no longer maintained

Please use @google-cloud/run instead.

Google Cloud Run Jobs Helper.
Allows you to run job and check if job is currently running.

Table of Contents

Install

$ npm install gcr-jobs

Usage

const {Jobs} = require('gcr-jobs');

// replace with your Project ID and Service Account
const PROJECT_ID = 'my-example-project';
const SERVICE_ACCOUNT = '[email protected]';

// replace with your Job name
const JOB_ID = 'my-example-job';

// create class instance
const jobs = new Jobs(PROJECT_ID, SERVICE_ACCOUNT);

// run job
const result = await jobs.runJob(JOB_ID);

// check if job is currently running
const isJobRunning = await jobs.isJobRunning(JOB_ID);

License

MIT