When you need this
Your website can stay online while a nightly import, report or queue cleanup has stopped running. An HTTP check cannot confirm a background job finished. Tickwatch expects a signal on the job schedule and tracks its start, completion and failure separately.
How to connect
- 1
Create a cron monitor with the scheduler’s expression and timezone, plus an allowance for late runs.
- 2
Save the wrapper below and replace the job invocation in crontab with the wrapped command.
- 3
Connect Telegram or email. Verify one successful run, one failure and one missed run using a test job.
Ready-to-use example
Install Bash, curl and uuidgen on the job server. Save the code as /opt/tickwatch-run.sh, replace the ping URL with your own and use the absolute path to your job. Keep the ping key private. The wrapper preserves the job exit code; a failed monitoring request does not interrupt it.
#!/usr/bin/env bash
# Save as tickwatch-run.sh; run: bash tickwatch-run.sh /path/to/job.sh
if [ "$#" -eq 0 ]; then echo "Usage: $0 command [args...]" >&2; exit 2; fi
PING='https://ping.tickwatch.dev/YOUR_PING_KEY'
RID=$(uuidgen) || exit 1
ping() {
curl -fsS --connect-timeout 3 --max-time 5 --retry 2 --retry-max-time 12 \
-X POST "$PING/$1?rid=$RID" >/dev/null 2>&1 || true
}
finish() {
code=$?
trap - EXIT
if [ "$code" -eq 0 ]; then ping ""; else ping fail; fi
exit "$code"
}
trap finish EXIT
trap 'exit 130' INT
trap 'exit 143' TERM
ping start
"$@"0 3 * * * /usr/bin/bash /opt/tickwatch-run.sh /usr/local/bin/job.shCheck before going live
A nonzero exit code sends /fail. Missing signals are detected after the deadline and grace period.
Set a maximum runtime to catch a /start signal with no matching completion.
Check PATH, permissions, working directory and environment for the cron user. Running a command in your terminal does not reproduce that environment.
Common questions
Do I need a server agent?
This setup only needs outgoing HTTPS requests from curl. No inbound port needs to be opened for Tickwatch.
What if the whole server goes offline?
Signals stop arriving and the monitor detects a missed deadline. This identifies a missing report, not the root cause of the server outage.