Skip to main content
Automation is optional and ran independently from Orbit.
Without these, you’ll need to manually refresh certain aspects of your Workspace.
You’ll only need to set these up if you’re self-hosting or using vercel.
We handle it for you on Cloud Instances.
You must be on Orbit 2.1.4beta5 or later.

Self-Hosting

This section is for anyone running Orbit on a dedicated or virtual linux based operating system.
  1. In your root folder, create a file named .automation_env
    nano /root/.automation_env
    
  2. Insert a 32 character secret key and save (X -> **Y **-> Enter).
    export CRON_SECRET='INSERT_CODE_HERE'
    
  3. Next, you’ll need to add this to your Orbit **.env **and save (X -> **Y **-> Enter).
    nano /root/orbit/.env
    
    CRON_SECRET="INSERT_SAME_CODE"
    
  4. Next we’ll need to insert the code into Crontab.
    crontab -e
    
    At the bottom of the file, paste the following. Be sure to change the URL to your own.
    Once done, save. (X -> **Y **-> Enter)
    * * * * * . /root/.automation_env && /usr/bin/curl -fsS -X POST 'https://instance.planetaryapp.cloud/api/cron/update-sessions' -H "x-cron-secret: $CRON_SECRET" | /usr/bin/jq -r || true
    0 * * * * . /root/.automation_env && /usr/bin/curl -fsS -X POST 'https://instance.planetaryapp.cloud/api/cron/update-roles' -H "x-cron-secret: $CRON_SECRET" | /usr/bin/jq -r || true
    
  5. Done!
    • Your group roles will now automatically sync every hour adding any new members to your workspace.
    • Your session statuses will now update in accordance with the statuses setup enhancing your API Development Opportunities.

Vercel

  1. In your GitHub repo, add a secret CRON_SECRET (Settings → Secrets & variables → Actions → New repository secret). Put the same value you set in Vercel env.
  2. Create a workflow file: .github/workflows/cron-session-webhooks.yml
  3. Example workflow (copy/paste):
    name: Update Roles Cron
    
    on:
      schedule:
        - cron: '0 * * * *' # every hour
      workflow_dispatch: {}
    
    jobs:
      call-cron:
        runs-on: ubuntu-latest
        steps:
          - name: Call Vercel cron endpoint
            env:
              CRON_SECRET: ${{ secrets.CRON_SECRET }}
              TARGET_URL: https://instance.planetaryapp.cloud/api/cron/update-roles
            run: |
              # Use curl, fail if non-2xx
              echo "Calling $TARGET_URL"
              curl -sS -X POST "$TARGET_URL" -H "x-cron-secret: $CRON_SECRET" -H "Content-Type: application/json" --fail -o /dev/null
              echo "OK"
    
    name: Update Sessions Cron
    
    on:
      schedule:
        - cron: '* * * * *' # every hour
      workflow_dispatch: {}
    
    jobs:
      call-cron:
        runs-on: ubuntu-latest
        steps:
          - name: Call Vercel cron endpoint
            env:
              CRON_SECRET: ${{ secrets.CRON_SECRET }}
              TARGET_URL: https://instance.planetaryapp.cloud/api/cron/update-sessions
            run: |
              # Use curl, fail if non-2xx
              echo "Calling $TARGET_URL"
              curl -sS -X POST "$TARGET_URL" -H "x-cron-secret: $CRON_SECRET" -H "Content-Type: application/json" --fail -o /dev/null
              echo "OK"
    
  4. Replace https://instance.planetaryapp.cloud with your real domain (or Vercel preview URL if calling preview).
  5. Use workflow_dispatch to trigger manually for testing.

Next steps