Skip to content

Let your cron jobs report in ​

Add one line at the end of a job and your phone knows how it went. A send without a topic goes straight to your own devices, so there is nothing to set up first.

Good for: backups, certificate renewals, batch imports, long-running builds, and anything that runs unattended and should be able to reach you when it matters.

bash
#!/bin/sh
export SP_API_TOKEN="your-token"

if ./backup.sh; then
  sp notify --title "βœ… Backup done" --content "db-host nightly, $(date +%F)"
else
  sp notify --title "🚨 Backup failed" --content "Check /var/log/backup.log on db-host"
fi
python
import subprocess
from simplepush import Client

client = Client(api_token="YOUR_API_TOKEN")

result = subprocess.run(["./backup.sh"])
if result.returncode == 0:
    client.send_notification(title="βœ… Backup done", content="db-host nightly")
else:
    client.send_notification(
        title="🚨 Backup failed",
        content="Check /var/log/backup.log on db-host",
    )
ts
import { Client } from '@simplepush/sdk'

const client = new Client({ apiToken: process.env.SP_API_TOKEN! })

try {
  await runBackup()
  await client.sendNotification({ title: 'βœ… Backup done', content: 'db-host nightly' })
} catch {
  await client.sendNotification({
    title: '🚨 Backup failed',
    content: 'Check /var/log/backup.log on db-host',
  })
}
bash
curl -X POST https://api.simplepu.sh/v1/notifications \
  -H "API-Token: $SP_API_TOKEN" \
  -H "Title: βœ… Backup done" \
  -H "Content: db-host nightly, finished in 74s"

The CLI reads the token from $SP_API_TOKEN. A cron environment only needs that one variable. Notifications count against a generous daily allowance. A handful of job reports per night costs you nothing.

If a failure should demand attention instead of scrolling by, send a task with choices (Retry,Skip,Wake me up) instead of a plain notification. The job can then wait for your answer.