Skip to content

Let your cron jobs report in ​

One line at the end of a job and your phone knows how it went. Sending 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, anything that runs unattended and should be able to reach you when it matters.

bash
#!/bin/sh
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, so a cron environment only needs that one variable. Notifications count against a generous daily allowance, so a handful of job reports per night costs you nothing.

Want the failure case to demand attention instead of scrolling by? Send a task with choices (Retry,Skip,Wake me up) instead of a plain notification, and let the job wait for your answer.