LoginSignup

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 5 years have passed since last update.

[RescaleAPI] ジョブの実行

Last updated at Posted at 2017-02-13

0. 前提

事前に下記が実施されていることを前提とします。設定済みであれば飛ばしてOKです。

1. ジョブの実行

1.1 スクリプトの作成

このファイルを "rescale-submit.sh" という名前で保存します。

rescale-submit.shの作成
vi ${script}/rescale-submit.sh
source
#!/bin/sh

JOB_ID=$1

TOKEN="${RESCALE_API_TOKEN}"

curl -s -X POST -H "Authorization: Token ${TOKEN}" \
https://platform.rescale.jp/api/v2/jobs/${JOB_ID}/submit/
実行権限付与
chmod +x ${script}/rescale-submit.sh

1.2 実行例

変数の確認
cat << ETX

RESCALE_API_TOKEN: ${RESCALE_API_TOKEN}
jobId: ${jobId}

ETX
submit_job
rescale-submit.sh ${jobId}
実行結果
(返り値なし)
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up