#!/usr/bin/env bash
set -euo pipefail
if [[ -z "${APP_URL:-}" || -z "${CRON_SECRET:-}" ]]; then
  echo "Set APP_URL and CRON_SECRET"
  exit 1
fi
curl -sS "${APP_URL}/api/cron/run?secret=${CRON_SECRET}"
echo
