<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: anypush</title>
    <description>The latest articles on DEV Community by anypush (@anypush).</description>
    <link>https://dev.to/anypush</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4272419%2Fd4a20e0e-9bb0-486f-84cb-ccea2303392c.png</url>
      <title>DEV Community: anypush</title>
      <link>https://dev.to/anypush</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anypush"/>
    <language>en</language>
    <item>
      <title>Send a push notification to your phone with curl</title>
      <dc:creator>anypush</dc:creator>
      <pubDate>Sun, 29 Nov 2026 14:24:21 +0000</pubDate>
      <link>https://dev.to/anypush/send-a-push-notification-to-your-phone-with-curl-4h41</link>
      <guid>https://dev.to/anypush/send-a-push-notification-to-your-phone-with-curl-4h41</guid>
      <description>&lt;p&gt;One curl command sends a notification to your Android phone: text, a title, a priority and a link. No SDK, no API key, no account token: the channel's address is the only setting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole API is one POST
&lt;/h2&gt;

&lt;p&gt;Install anypush on your Android phone, make a channel and copy its address. Then POST to it. The body is the message; headers add a title, a priority and a link to open when you tap it. The answer is 202 with the message's id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;text&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -d &lt;span class="s2"&gt;"Disk at 91% on nas"&lt;/span&gt; https://anypush.app/h/your-token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;HTTP/2 202  {"duplicate":false,"id":729,"status_url":"https://anypush.app/h/your-token/messages/729"}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;title, priority, link&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -H &lt;span class="s2"&gt;"Title: nas"&lt;/span&gt; \
     -H &lt;span class="s2"&gt;"Priority: high"&lt;/span&gt; \
     -H &lt;span class="s2"&gt;"Click: https://nas.local:5001"&lt;/span&gt; \
     -d &lt;span class="s2"&gt;"Disk at 91%"&lt;/span&gt; \
     https://anypush.app/h/your-token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;HTTP/2 202  {"duplicate":false,"id":730,"status_url":"https://anypush.app/h/your-token/messages/730"}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSON&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
     -d &lt;span class="s1"&gt;'{"title":"nas","message":"Disk at 91%","priority":"high","url":"https://nas.local:5001"}'&lt;/span&gt; \
     https://anypush.app/h/your-token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;HTTP/2 202  {"duplicate":false,"id":731,"status_url":"https://anypush.app/h/your-token/messages/731"}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;after a command (bash)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# 0 is a silent heartbeat, anything else an alert with the body as its text&lt;/span&gt;
./deploy.sh 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; tail -n 20 &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /tmp/deploy.log
curl --data-binary @/tmp/deploy.log &lt;span class="s2"&gt;"https://anypush.app/h/your-token/${PIPESTATUS[0]}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;{"duplicate":false,"id":749}&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headers&lt;/strong&gt;: Title, Priority (low, normal or high; ntfy's min, default, max, urgent and 1 to 5 work too) and Click. X-Title, X-Priority and X-Url are the same.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON&lt;/strong&gt;: message (required), title, priority, url.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limits&lt;/strong&gt;: A message up to 4,096 characters, a title up to 256, 64 KiB a request, 60 requests a minute per channel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retries&lt;/strong&gt;: Send an Idempotency-Key header and a retry within 24 hours sends once.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Coming from ntfy?
&lt;/h2&gt;

&lt;p&gt;The headers above are ntfy's names, so a curl line written for ntfy mostly needs only the address changed. A channel's address is private by default: nobody can subscribe to it, and only someone who has the address can send to it. Tools with an ntfy option, such as Uptime Kuma, Healthchecks.io and borgmatic, can use a channel's address as their ntfy server. Attachments, action buttons and an iPhone app are things ntfy has and anypush does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tested on 26 November 2026
&lt;/h2&gt;

&lt;p&gt;Each command above ran against a live channel on 26 November 2026; each answer is the real one, with the address shortened to your-token. The text example arrived as a normal notification without a title. The headers and the JSON examples each arrived as a high-priority "nas" notification that opens &lt;a href="https://nas.local:5001" rel="noopener noreferrer"&gt;https://nas.local:5001&lt;/a&gt; when tapped. The bash example ran after a script that exited 4, and arrived as "Exited with status 4" with the script's last lines as the text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Do I need an API key?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. The channel's address is the key: anyone who has it can send to your phone, so keep it in an environment variable or a secret, not in code you share. If it leaks, the app gives the channel a new address and the old one stops working at once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it work with wget, PowerShell or Python?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Anything that can make an HTTP POST works. In PowerShell: Invoke-RestMethod -Method Post -Uri $url -Body 'Disk at 91%'. For Python, see push notifications from Python (anypush.app/python-push-notification). The app shows recipes with your own address filled in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does the 202 mean?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That anypush kept the message and is sending it to your phone. The status_url in the answer says whether a phone has reported it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it work on an iPhone?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. anypush is an Android app, Android 7 and up.&lt;/p&gt;

&lt;p&gt;More recipes: &lt;a href="https://anypush.app/python-push-notification?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=curl-push-notification" rel="noopener noreferrer"&gt;push notifications from Python&lt;/a&gt;, &lt;a href="https://anypush.app/cron-job-monitoring?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=curl-push-notification" rel="noopener noreferrer"&gt;cron job monitoring&lt;/a&gt;, &lt;a href="https://anypush.app/backup-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=curl-push-notification" rel="noopener noreferrer"&gt;backup failed alerts&lt;/a&gt;, &lt;a href="https://anypush.app/github-actions-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=curl-push-notification" rel="noopener noreferrer"&gt;GitHub Actions notifications&lt;/a&gt;, and &lt;a href="https://anypush.app/webhooks?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=curl-push-notification" rel="noopener noreferrer"&gt;everything a channel's address takes&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;anypush is on &lt;a href="https://play.google.com/store/apps/details?id=app.anypush&amp;amp;referrer=utm_source%3Ddevto%26utm_medium%3Dpost%26utm_campaign%3Dcurl-push-notification" rel="noopener noreferrer"&gt;Google Play&lt;/a&gt;: Free to start, no ads. Android 7 and up. The tested original of this recipe, with the other recipes, is on &lt;a href="https://anypush.app/curl-push-notification?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=curl-push-notification" rel="noopener noreferrer"&gt;anypush.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>curl</category>
      <category>bash</category>
      <category>android</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>GitHub Actions notifications on your Android phone, and an alert when a schedule stops</title>
      <dc:creator>anypush</dc:creator>
      <pubDate>Sun, 29 Nov 2026 14:19:11 +0000</pubDate>
      <link>https://dev.to/anypush/github-actions-notifications-on-your-android-phone-and-an-alert-when-a-schedule-stops-5bp6</link>
      <guid>https://dev.to/anypush/github-actions-notifications-on-your-android-phone-and-an-alert-when-a-schedule-stops-5bp6</guid>
      <description>&lt;p&gt;A failed workflow buzzes your phone with a link to the run. A scheduled workflow sends a silent heartbeat, so you also hear when it stops running.&lt;/p&gt;

&lt;h2&gt;
  
  
  A push when a workflow fails
&lt;/h2&gt;

&lt;p&gt;Make a channel in the app and copy its address. In the repository, add it as a secret named ANYPUSH_CHANNEL (Settings, Secrets and variables, Actions). Then add a step that runs only when the job failed. Tapping the notification opens the run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;curl step&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Tell my phone&lt;/span&gt;
  &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;failure()&lt;/span&gt;
  &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
  &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="s"&gt;curl -fsS -m 10 --retry 3 \&lt;/span&gt;
      &lt;span class="na"&gt;-H "Title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.repository }}" \&lt;/span&gt;
      &lt;span class="na"&gt;-H "Priority&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;high" \&lt;/span&gt;
      &lt;span class="na"&gt;-H "Click&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \&lt;/span&gt;
      &lt;span class="s"&gt;-d "${{ github.workflow }} failed on ${{ github.ref_name }}" \&lt;/span&gt;
      &lt;span class="s2"&gt;"${{ secrets.ANYPUSH_CHANNEL }}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;{"duplicate":false,"id":795,"status_url":"***/messages/795"}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;anypush notify action&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;anypush/anypush-notify@v1&lt;/span&gt;
  &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;failure()&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.ANYPUSH_CHANNEL }}&lt;/span&gt;
    &lt;span class="na"&gt;job-status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ job.status }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;anypush: sent (message 792).&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The action sets the title, the link and the priority for you, and keys each message to the run, so a retried step sends once. Its source is short: github.com/anypush/anypush-notify.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Hear about the nightly run that never started
&lt;/h2&gt;

&lt;p&gt;GitHub's own documentation says two things about the schedule event: it "can be delayed during periods of high loads of GitHub Actions workflow runs", when "some queued jobs may be dropped", and "in a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days". A dropped or disabled run sends no failure. So let every run report, silently when it works, and switch on Alert me if it goes quiet on the channel, with a little more than the schedule's interval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;nightly workflow&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"17 3 * * *"&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;nightly&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v7&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./nightly.sh&lt;/span&gt;
      &lt;span class="c1"&gt;# a success is a silent heartbeat, a failure an alert
&lt;/span&gt;      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always()&lt;/span&gt;
        &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"${{ job.status }}"&lt;/span&gt; &lt;span class="s"&gt;=&lt;/span&gt; &lt;span class="s"&gt;success&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="nv"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="s"&gt;s=0 || s=1&lt;/span&gt;
          &lt;span class="s"&gt;curl -fsS -m 10 --retry 3 -X POST "${{ secrets.ANYPUSH_CHANNEL }}/$s"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;the same, with the action&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;anypush/anypush-notify@v1&lt;/span&gt;
  &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;always()&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.ANYPUSH_CHANNEL }}&lt;/span&gt;
    &lt;span class="na"&gt;job-status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ job.status }}&lt;/span&gt;
    &lt;span class="na"&gt;heartbeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Then, in the app, open the channel and set Alert me if it goes quiet to 1 day for a nightly schedule. A run that is dropped, delayed past the day, or never scheduled again reaches you as one alert. Source: GitHub Docs, Events that trigger workflows, schedule.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Tested on 26 November 2026
&lt;/h2&gt;

&lt;p&gt;On 26 November 2026 both examples ran on GitHub's ubuntu-latest, macos-latest and windows-latest runners against a live channel, in public workflows: &lt;a href="https://github.com/anypush/anypush-notify/actions" rel="noopener noreferrer"&gt;github.com/anypush/anypush-notify/actions&lt;/a&gt;. After a step that failed, the curl step (with the system's name added to its text) arrived from each system as a high-priority notification titled with the repository, and tapping it opened the run. GitHub masks a secret in the log, so the address shows there as ***. The action sent one message from each system, and with heartbeat: true a job that succeeded sent a heartbeat and no notification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Doesn't GitHub notify me already?
&lt;/h2&gt;

&lt;p&gt;If you turn them on, GitHub notifies you by email or on the web when a workflow run you triggered has completed (&lt;a href="https://docs.github.com/en/actions/concepts/workflows-and-actions/notifications-for-workflow-runs" rel="noopener noreferrer"&gt;GitHub Docs, notifications for workflow runs&lt;/a&gt;). Use those if they reach you. anypush is for an alert that does not depend on who pushed, that a scheduled run can send, that can be high priority through your phone's quiet hours, and that also covers the run that never happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is the channel address safe in a public repository?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only as a secret. Never put the address in the workflow file: anyone with it can send to your phone. GitHub does not pass secrets to workflows that run on pull requests from forks, so a stranger's pull request cannot read it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will a re-run send the message twice?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With the action, no: each message carries a key made of the run, the attempt and the step. The curl step sends again on every run, which for a re-run is usually what you want.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it work on macOS and Windows runners?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Both the curl step and the action ran on ubuntu-latest, macos-latest and windows-latest on the day this page was tested.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I send from GitLab CI, Jenkins or any other CI?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. A channel is an HTTP POST, so the curl line works in any CI that has curl.&lt;/p&gt;

&lt;p&gt;More recipes: &lt;a href="https://anypush.app/cron-job-monitoring?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=github-actions-notifications" rel="noopener noreferrer"&gt;cron job monitoring&lt;/a&gt;, &lt;a href="https://anypush.app/backup-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=github-actions-notifications" rel="noopener noreferrer"&gt;backup failed alerts&lt;/a&gt;, &lt;a href="https://anypush.app/curl-push-notification?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=github-actions-notifications" rel="noopener noreferrer"&gt;push notifications with curl&lt;/a&gt;, and &lt;a href="https://anypush.app/webhooks?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=github-actions-notifications" rel="noopener noreferrer"&gt;everything a channel's address takes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The action's source: &lt;a href="https://github.com/anypush/anypush-notify" rel="noopener noreferrer"&gt;anypush/anypush-notify on GitHub&lt;/a&gt;. It sits with anypush's other open-source integrations (Home Assistant, n8n, Node-RED) at &lt;a href="https://github.com/anypush" rel="noopener noreferrer"&gt;github.com/anypush&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;anypush is on &lt;a href="https://play.google.com/store/apps/details?id=app.anypush&amp;amp;referrer=utm_source%3Ddevto%26utm_medium%3Dpost%26utm_campaign%3Dgithub-actions-notifications" rel="noopener noreferrer"&gt;Google Play&lt;/a&gt;: Free to start, no ads. Android 7 and up. The tested original of this recipe, with the other recipes, is on &lt;a href="https://anypush.app/github-actions-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=github-actions-notifications" rel="noopener noreferrer"&gt;anypush.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>githubactions</category>
      <category>cicd</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Backup failed? Get the alert on your phone, for restic and borg</title>
      <dc:creator>anypush</dc:creator>
      <pubDate>Sun, 29 Nov 2026 14:11:56 +0000</pubDate>
      <link>https://dev.to/anypush/backup-failed-get-the-alert-on-your-phone-for-restic-and-borg-dlf</link>
      <guid>https://dev.to/anypush/backup-failed-get-the-alert-on-your-phone-for-restic-and-borg-dlf</guid>
      <description>&lt;p&gt;One line after the backup. A failed restic or borg run buzzes your Android phone with the end of its log, a good run stays silent, and a backup that stops running alerts you too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Send restic's exit status, and its last lines
&lt;/h2&gt;

&lt;p&gt;Make a channel in the app and copy its address. Run the backup from a small script that posts restic's exit status to the address, with the end of the output as the body. 0 is a silent heartbeat. Any other status is a high-priority alert, "Exited with status N", whose text is the end of the log, so the notification already says what went wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;restic&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c"&gt;# /usr/local/bin/backup.sh, run nightly by cron or a systemd timer&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;RESTIC_REPOSITORY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/srv/backup/restic
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;RESTIC_PASSWORD_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/root/.restic-password
&lt;span class="nv"&gt;ANYPUSH_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://anypush.app/h/your-token

&lt;span class="nv"&gt;out&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;restic backup /home /etc --exclude-caches 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s\n'&lt;/span&gt; &lt;span class="s2"&gt;"$out"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; tail -n 20 &lt;span class="o"&gt;|&lt;/span&gt; curl -fsS -m 10 --retry 3 --data-binary @- &lt;span class="s2"&gt;"$ANYPUSH_URL/$status"&lt;/span&gt;
&lt;span class="nb"&gt;exit&lt;/span&gt; &lt;span class="nv"&gt;$status&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;exit 0 → {"heartbeat":true} · exit 10 → {"duplicate":false,"id":747}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;borg (not run here)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c"&gt;# the same pattern; borg 1.x exits 0 (success), 1 (warning) or 2 (error)&lt;/span&gt;
&lt;span class="nv"&gt;out&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;borg create --stats &lt;span class="s2"&gt;"$BORG_REPO::{hostname}-{now}"&lt;/span&gt; /home /etc 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s\n'&lt;/span&gt; &lt;span class="s2"&gt;"$out"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; tail -n 20 &lt;span class="o"&gt;|&lt;/span&gt; curl -fsS -m 10 --retry 3 --data-binary @- &lt;span class="s2"&gt;"$ANYPUSH_URL/$status"&lt;/span&gt;
&lt;span class="nb"&gt;exit&lt;/span&gt; &lt;span class="nv"&gt;$status&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The address is a secret: anyone who has it can send to your phone. Keep it in a file only root can read.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  restic's exit codes, as the alert's title
&lt;/h2&gt;

&lt;p&gt;The alert's title is the status, so you know the kind of failure before you open it. From restic's documentation (Scripting, Exit codes), which also says an unknown code "MUST be treated as a command failure":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0&lt;/strong&gt;: Command was successful: a silent heartbeat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1&lt;/strong&gt;: Command failed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3&lt;/strong&gt;: backup could not read some source data: a snapshot was made without those files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10&lt;/strong&gt;: Repository does not exist (since restic 0.17.0): a disk that is not mounted, a wrong path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;11&lt;/strong&gt;: Failed to lock repository (since 0.17.0): another restic is running, or a stale lock.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;12&lt;/strong&gt;: Wrong password (since 0.17.1).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;130&lt;/strong&gt;: Command was cancelled (SIGINT or SIGTERM).&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;borg 1.x: 0 success, 1 warning (the run reached its end, but check the log), 2 error, 128+N killed by signal N (borg's documentation, General, Return codes). To be told only about errors, send 0 for warnings too: [ $status -eq 1 ] &amp;amp;&amp;amp; status=0.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The backup that never runs
&lt;/h2&gt;

&lt;p&gt;A backup that fails can report itself. One that never starts cannot: a timer that was disabled, a server that was off at 3 a.m., a crontab that was replaced. Open the channel in the app and switch on Alert me if it goes quiet, with 1 day for a nightly backup (25 hours if its start time moves). Every good run starts that clock again; if none arrives, you get one alert about a minute after the day is up. The same works for &lt;a href="https://anypush.app/cron-job-monitoring?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=backup-notifications" rel="noopener noreferrer"&gt;any cron job&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tested on 26 November 2026
&lt;/h2&gt;

&lt;p&gt;restic 0.20.0 ran the script above against a test repository and a live channel on 26 November 2026. A good backup answered {"heartbeat":true} and sent no notification. A source file restic could not read made it exit 3, which arrived as "Exited with status 3" with restic's "permission denied" line as the text. A repository path that did not exist, exit 10, arrived with "Fatal: repository does not exist". A wrong password, exit 12, arrived with "Fatal: wrong password or no key found". The borg script was not run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;restic: &lt;a href="https://restic.readthedocs.io/en/stable/075_scripting.html#exit-codes" rel="noopener noreferrer"&gt;Scripting, Exit codes&lt;/a&gt;. borg: &lt;a href="https://borgbackup.readthedocs.io/en/stable/usage/general.html#return-codes" rel="noopener noreferrer"&gt;General, Return codes&lt;/a&gt;. borgmatic has its own monitoring hooks, ntfy among them (&lt;a href="https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/" rel="noopener noreferrer"&gt;How to monitor your backups&lt;/a&gt;): its ntfy hook can point at a channel's address, as Uptime Kuma's and Healthchecks.io's ntfy options can.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does a failed backup every night mean one alert a night?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes: one alert per run that fails. If the same job runs more often and keeps failing with the same status, you get at most one alert per clock hour for that status.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long can the log be?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The alert shows the end of what you send, up to 4,096 characters. tail -n 20 keeps it to the lines that say what went wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will a good backup notify me?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Status 0 is a heartbeat: nothing in your inbox, no notification. To be told about good runs too, send a normal message instead (curl -d 'backup ok' to the address without the number).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should this be my only backup check?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. It tells you that a backup ran and how it exited, not that you can restore it. Test a restore now and then, with restic check and a real restore of a few files.&lt;/p&gt;

&lt;p&gt;More recipes: &lt;a href="https://anypush.app/cron-job-monitoring?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=backup-notifications" rel="noopener noreferrer"&gt;cron job monitoring&lt;/a&gt;, &lt;a href="https://anypush.app/github-actions-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=backup-notifications" rel="noopener noreferrer"&gt;GitHub Actions notifications&lt;/a&gt;, &lt;a href="https://anypush.app/curl-push-notification?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=backup-notifications" rel="noopener noreferrer"&gt;push notifications with curl&lt;/a&gt;, and &lt;a href="https://anypush.app/webhooks?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=backup-notifications" rel="noopener noreferrer"&gt;everything a channel's address takes&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;anypush is on &lt;a href="https://play.google.com/store/apps/details?id=app.anypush&amp;amp;referrer=utm_source%3Ddevto%26utm_medium%3Dpost%26utm_campaign%3Dbackup-notifications" rel="noopener noreferrer"&gt;Google Play&lt;/a&gt;: Free to start, no ads. Android 7 and up. The tested original of this recipe, with the other recipes, is on &lt;a href="https://anypush.app/backup-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=backup-notifications" rel="noopener noreferrer"&gt;anypush.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>backup</category>
      <category>linux</category>
      <category>selfhosted</category>
      <category>devops</category>
    </item>
    <item>
      <title>Cron job monitoring on your phone, for the job that fails and the job that never runs</title>
      <dc:creator>anypush</dc:creator>
      <pubDate>Sun, 29 Nov 2026 14:11:44 +0000</pubDate>
      <link>https://dev.to/anypush/cron-job-monitoring-on-your-phone-for-the-job-that-fails-and-the-job-that-never-runs-3gjc</link>
      <guid>https://dev.to/anypush/cron-job-monitoring-on-your-phone-for-the-job-that-fails-and-the-job-that-never-runs-3gjc</guid>
      <description>&lt;p&gt;Add one curl after a cron job. A failure buzzes your Android phone with the end of its output, a success stays silent, and a run that never happens alerts you too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Send the job's exit status
&lt;/h2&gt;

&lt;p&gt;Make a channel in the app and copy its address. Then end the job's line with a POST to that address plus $?, the status the job exited with. 0 is a silent heartbeat: no notification. Any other status is a high-priority alert, "Exited with status N", with the end of the output as its text. A job that keeps failing alerts you at most once a clock hour for each status, not on every run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;crontab&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# crontab -e&lt;/span&gt;
&lt;span class="nv"&gt;ANYPUSH_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://anypush.app/h/your-token

&lt;span class="c"&gt;# every 15 minutes; the last 20 lines of output go along if it fails&lt;/span&gt;
*/15 * * * * /usr/local/bin/sync.sh &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /tmp/sync.log 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1&lt;span class="o"&gt;;&lt;/span&gt; tail -n 20 /tmp/sync.log &lt;span class="o"&gt;|&lt;/span&gt; curl -fsS -m 10 --retry 3 --data-binary @- &lt;span class="s2"&gt;"$ANYPUSH_URL/$?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;exit 0 → {"heartbeat":true} · exit 23 → {"duplicate":false,"id":743}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;systemd timer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="c1"&gt;# /etc/systemd/system/sync.service, started by sync.timer
&lt;/span&gt;&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;oneshot&lt;/span&gt;
&lt;span class="na"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sync&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;
&lt;span class="c1"&gt;# runs after the job, whether it worked or not
&lt;/span&gt;&lt;span class="na"&gt;ExecStopPost&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="s1"&gt;'if [ "$SERVICE_RESULT" = success ]; then s=0; else s=1; fi; curl -fsS -m 10 --retry 3 -X POST "https://anypush.app/h/your-token/$s"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Answer: &lt;code&gt;success → {"heartbeat":true} · failure → {"duplicate":false,"id":745}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Any script&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nv"&gt;out&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;/usr/local/bin/sync.sh 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%s\n'&lt;/span&gt; &lt;span class="s2"&gt;"$out"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; tail -n 20 &lt;span class="o"&gt;|&lt;/span&gt; curl -fsS -m 10 --retry 3 --data-binary @- &lt;span class="s2"&gt;"$ANYPUSH_URL/$status"&lt;/span&gt;
&lt;span class="nb"&gt;exit&lt;/span&gt; &lt;span class="nv"&gt;$status&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The address is a secret: anyone who has it can send to your phone. Keep it in the crontab or an environment file that only you can read.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A silence alert for the run that does not happen
&lt;/h2&gt;

&lt;p&gt;A failed job can report itself. A job that never starts cannot: a stopped cron daemon, a typo in the schedule, a server that is down, a disk that is full before the job begins. Open the channel in the app and switch on Alert me if it goes quiet, with a little more than the job's interval. Every heartbeat starts that clock again. If none arrives in time, you get one alert about a minute after the silence runs out, and the next heartbeat tells you the job is back.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every 15 minutes&lt;/strong&gt;: 1 hour on Free, or 20 minutes on Plus&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hourly&lt;/strong&gt;: 2 hours&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nightly&lt;/strong&gt;: 1 day, or 25 hours if the job's start time moves&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weekly&lt;/strong&gt;: 8 days&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shortest&lt;/strong&gt;: 1 hour on Free, 5 minutes on Plus. Checked every minute on both.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tested on 26 November 2026
&lt;/h2&gt;

&lt;p&gt;On 26 November 2026 the crontab line ran against a live channel under bash (Fedora's /bin/sh) and under dash (Debian's /bin/sh); in both, $? at the end of the line is the job's status. A job that exited 0 answered {"heartbeat":true} and sent no notification. Jobs that exited 23 and 5 arrived as high-priority "Exited with status 23" and "Exited with status 5", with the job's last lines as the text. The systemd unit ran under systemd 262 exactly as written above: a run that succeeded sent a heartbeat, and a run that failed arrived as "Exited with status 1". The silence alert was tested on a channel given 1 hour: one high-priority alert came 60 minutes after the setting was saved, the next heartbeat answered {"heartbeat":true,"id":779} and sent one "Heard from again", and the heartbeat after that was silent again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not cron's own mail?
&lt;/h2&gt;

&lt;p&gt;cron mails a job's output to MAILTO, which needs a mail server on the machine that can deliver to you (&lt;a href="https://man7.org/linux/man-pages/man5/crontab.5.html" rel="noopener noreferrer"&gt;crontab(5)&lt;/a&gt;). It mails on any output, not on failure, so a noisy job fills your inbox and a silent failure sends nothing. And a job that never runs sends no mail at all. The exit status says what happened, and the silence alert covers what did not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other ways
&lt;/h2&gt;

&lt;p&gt;If you already run a monitoring service with a dashboard, such as Healthchecks.io or Cronitor, keep it, and point its alerts at your phone in the way it offers. anypush is for when you want the alert itself on your Android phone, with the job's output in it, and nothing else to run. It has no iPhone app and cannot be self-hosted. &lt;a href="https://anypush.app/editorial/compare?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=cron-job-monitoring" rel="noopener noreferrer"&gt;How anypush compares&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Will a job that fails every few minutes flood my phone?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. The same exit status alerts at most once per clock hour. A different status, say 1 and then 2, alerts again, because it is a different failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does a heartbeat count as a message?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. A heartbeat (status 0) is not kept in your inbox and makes no notification. It moves the channel's last-seen time and starts the silence clock again. It does count towards the 60 requests a minute a channel takes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why POST, and not a plain GET?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Chat apps and link previews open addresses with GET. If a GET counted as a heartbeat, pasting the address into a chat could hide a dead job. anypush only takes a POST.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if curl itself cannot reach anypush?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;--retry 3 tries again on a network error. If the machine is offline for longer, the silence alert fires: that is the case it is for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should this be my only monitoring?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For anything critical, no. Alerts are best effort, and a phone can delay or silence them. Use anypush beside your other monitoring, not instead of it.&lt;/p&gt;

&lt;p&gt;More recipes: &lt;a href="https://anypush.app/backup-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=cron-job-monitoring" rel="noopener noreferrer"&gt;backup failed alerts for restic and borg&lt;/a&gt;, &lt;a href="https://anypush.app/github-actions-notifications?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=cron-job-monitoring" rel="noopener noreferrer"&gt;GitHub Actions notifications&lt;/a&gt;, &lt;a href="https://anypush.app/curl-push-notification?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=cron-job-monitoring" rel="noopener noreferrer"&gt;push notifications with curl&lt;/a&gt;, and &lt;a href="https://anypush.app/webhooks?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=cron-job-monitoring" rel="noopener noreferrer"&gt;everything a channel's address takes&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;anypush is on &lt;a href="https://play.google.com/store/apps/details?id=app.anypush&amp;amp;referrer=utm_source%3Ddevto%26utm_medium%3Dpost%26utm_campaign%3Dcron-job-monitoring" rel="noopener noreferrer"&gt;Google Play&lt;/a&gt;: Free to start, no ads. Android 7 and up. The tested original of this recipe, with the other recipes, is on &lt;a href="https://anypush.app/cron-job-monitoring?utm_source=devto&amp;amp;utm_medium=post&amp;amp;utm_campaign=cron-job-monitoring" rel="noopener noreferrer"&gt;anypush.app&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cron</category>
      <category>linux</category>
      <category>devops</category>
      <category>monitoring</category>
    </item>
  </channel>
</rss>
