AI でスケジュールジョブが実際に実行されたかを確認する

エージェントが cron ジョブの一覧と最終実行時刻を読み、遅延しているものや失敗しているものを平易な言葉で指摘します。

  • 読み取り専用の接続
  • スケジュール実行
  • コールバック
  • 予算の上限

実際の実行を見る

2026年10月7日 の実際の実行を再生しています。モデル: openai/gpt-6-luna。

成功run_465f762a5831e5d144145e2f5875031c$0.025 のうち $0.002811
  1. 待機中予算 $0.025 を確保
  2. MicroVMmicroVM ready
  3. MicroVMworker started · shell off · web off
  4. 接続ops GET /jobs
  5. 結果ops GET → 200
  6. MicroVMmicroVM destroyed
  7. 成功モデル呼び出し 2 回、トークン 3,246記録された出力(英語)

    Ops check at 2026-10-07 09:00 UTC: 2 jobs need attention; 6 are healthy.

    • invoice-export — Overdue: last ran 2026-10-05 03:00 UTC, 54 hours ago; expected every 24 hours (overdue threshold: more than 36 hours). No run is recorded on Oct 6 or 7. Next step: investigate the missed runs and trigger an export if needed.
    • sync-inventory — Failing: last ran 2026-10-07 08:30 UTC and status is failed; error: 401 Unauthorized from supplier API: token expired. Next step: renew the supplier API token and retry.
  8. ワーカーを破棄$0.002811 を請求、$0.022189 を解放
モデル $0.000411 · Web $0.00 · コンピュート $0.0024

自分で実行する

リクエスト全体が入力された状態で、サンプルをプレイグラウンドで開きます。実行はご自身のアカウントで、表示された予算の範囲内で、同じ読み取り専用のサンプルシステムに対して行われます。

このサンプルの予算: $0.025

仕組み

cron の静かな失敗は、後から高くつきます。エージェントは各ジョブの最終実行を想定される間隔と比べ、遅延や失敗を根拠とともに報告します。ジョブの API は読み取り専用で自身の時計を返すため、回答がエージェントの日付に左右されることはありません。

エージェントにできること、できないこと

権限はリクエストの一部です。ここに挙げていないものは、実行では利用できません。

設定許可
接続
ops: GET のみ、ephemer.al/api/samples/ops-api へ
Webオフ
シェルオフ
ファイルなし
ゼロデータ保持オフ: 記録は 30 日間保存されます
予算$0.025、厳格な上限
タイムアウト60 秒

認証情報がマシンに入ることはありません。ブローカーが各呼び出しに認証情報を付与し、上記のメソッドだけを通します。

コード

サンプルが送信する正確なリクエストです。EPHEMERAL_API_KEY には、組織のメンバーキーを設定してください。

curl -X POST $EPHEMERAL_URL/v1/runs \
  -H "Authorization: Bearer $EPHEMERAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d @request.json
リクエスト本文の全体 workflow.json

同じ本文を、ファイルをインラインにした形で示します。

workflow.json
{
  "prompt": "Read GET /jobs on the ops connection. Use the 'now' value in the response as the current time. A job is overdue when more than 1.5 times expected_every_hours have passed since last_run_at. A job is failing when last_status is failed. Reply in Markdown, at most 150 words: one headline sentence, then a bullet for each overdue or failing job with its name, the evidence (times and error) and a likely next step. Do not list healthy jobs, just say how many there are. Use only what the data returns and never guess; if a call fails or a field is missing, say so.",
  "connections": {
    "ops": {
      "type": "http",
      "url": "https://ephemer.al/api/samples/ops-api",
      "auth": {
        "type": "bearer",
        "token": "sample_read_key"
      },
      "allowed_methods": [
        "GET"
      ],
      "instructions": "GET /jobs returns now (the current time) and items with name, schedule, expected_every_hours, last_run_at, last_status, last_error, recent_statuses (newest first) and sometimes a note."
    }
  },
  "shell": false,
  "timeout_seconds": 60
}

このサンプルはスケジュールで実行されます。UTC の 0 * * * *。スケジュールは保存済みのワークフローを開始するため、まずリクエストをワークフローとして保存し、その後スケジュールを作成してください。

さらに読む

関連するサンプル

esc

「」に一致する項目はありません。