diff --git a/cron/agentd-tick.sh b/cron/agentd-tick.sh new file mode 100755 index 0000000..e79e6be --- /dev/null +++ b/cron/agentd-tick.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# cron entry (*/2): one agentd tick under server-access exec (Plane tokens in the process env only), with a lock. +# The outer flock skips a tick while the previous one still runs; agentd also holds its own state lock. +exec flock -n /home/ubuntu/.gwent-board/agentd.lock \ + timeout 900 python3 -I /home/ubuntu/.local/share/server-access-client/agent-access.py \ + --config https://nas.tail9531b.ts.net:8443/identity/agent.json exec \ + --secret-env PLANE_OREGON_API_TOKEN=PLANE_OREGON_API_TOKEN \ + --secret-env PLANE_WINDOW10_API_TOKEN=PLANE_WINDOW10_API_TOKEN --timeout 850 -- \ + python3 /home/ubuntu/Documents/wjj/project/plane-agentd/cli/agentd tick --once >> /home/ubuntu/.gwent-board/agentd-cron.log 2>&1