<?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: Gabrian Mak</title>
    <description>The latest articles on DEV Community by Gabrian Mak (@makgabri).</description>
    <link>https://dev.to/makgabri</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%2F4085301%2Fe08cafda-4fdd-47e1-9c76-af202cba1409.png</url>
      <title>DEV Community: Gabrian Mak</title>
      <link>https://dev.to/makgabri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/makgabri"/>
    <language>en</language>
    <item>
      <title>Turn a missed cron into a GitHub or Linear ticket</title>
      <dc:creator>Gabrian Mak</dc:creator>
      <pubDate>Mon, 24 Aug 2026 17:14:16 +0000</pubDate>
      <link>https://dev.to/makgabri/turn-a-missed-cron-into-a-github-or-linear-ticket-6i7</link>
      <guid>https://dev.to/makgabri/turn-a-missed-cron-into-a-github-or-linear-ticket-6i7</guid>
      <description>&lt;p&gt;Email is a bad place for “the backup never ran.”&lt;/p&gt;

&lt;p&gt;You get the Down ping, maybe a Slack message, then it scrolls off. The job that failed is sitting next to a GitHub repo or a Linear team. That is where someone actually closes work.&lt;/p&gt;

&lt;p&gt;Gonewatch now opens a &lt;strong&gt;ticket&lt;/strong&gt; when a monitor misses its window — GitHub Issues or Linear — instead of only sending chat.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chat vs ticket
&lt;/h2&gt;

&lt;p&gt;Slack, Discord, and Telegram are “look at this.” A ticket is “this is work.”&lt;/p&gt;

&lt;p&gt;Same heartbeat as before: the job POSTs when it succeeds. If the window is missed, Gonewatch marks the monitor Down. With tickets on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Down&lt;/strong&gt; opens one issue (&lt;code&gt;Down · nightly-backup&lt;/code&gt;), labeled &lt;code&gt;gonewatch&lt;/code&gt;. Body has the schedule, last heartbeat, and a link to the monitor. JSON payloads stay on the dashboard — they are not dumped into the ticket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reminders&lt;/strong&gt; comment on that same issue. If you closed it while the job is still Down, Gonewatch reopens it (GitHub) or moves it back to an open state (Linear) and comments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recovery&lt;/strong&gt; comments that it is Up, closes it (GitHub) or marks it Done (Linear), and stops tracking it. The next miss opens a &lt;strong&gt;new&lt;/strong&gt; issue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reminders do not spam a new ticket every hour.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Issues vs the heartbeat Action
&lt;/h2&gt;

&lt;p&gt;Two different GitHub pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gonewatch/heartbeat@v1&lt;/code&gt; — last step of a workflow. POSTs that the job ran.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub App on Account&lt;/strong&gt; — opens Issues in one repo when a monitor is Down. Issues write + metadata read. It does not read your code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can use both. The Action is the ping. The App is the ticket.&lt;/p&gt;

&lt;p&gt;Linear is the same ticket loop in one team. Issues are created as the Gonewatch app, in that team’s first Todo state so they show under Active.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Gonewatch → Account → Connect GitHub.&lt;/li&gt;
&lt;li&gt;Install the app on &lt;strong&gt;one&lt;/strong&gt; repository.&lt;/li&gt;
&lt;li&gt;Check connection (this does not open a test issue).&lt;/li&gt;
&lt;li&gt;Edit the monitor → enable GitHub Issues.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Linear&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Account → Connect Linear → approve the app.&lt;/li&gt;
&lt;li&gt;Pick &lt;strong&gt;one&lt;/strong&gt; team.&lt;/li&gt;
&lt;li&gt;Check connection.&lt;/li&gt;
&lt;li&gt;Enable Linear on the monitor.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Connecting does not turn tickets on for monitors you already have. One repo / one team per Gonewatch account. GitHub and Linear will not email you unless you already watch that repo or team.&lt;/p&gt;

&lt;p&gt;Free is still email only. Tickets are Basic and Pro, same as Slack.&lt;/p&gt;

&lt;h2&gt;
  
  
  A backup that files its own bug
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Gonewatch heartbeat&lt;/span&gt;
  &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;success()&lt;/span&gt;
  &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gonewatch/heartbeat@v1&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GONEWATCH_URL }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If tonight’s workflow never reaches that step, there is no ping, the monitor goes Down, and you get Down · production-db-backup in the repo (or LIN-123 in the team) instead of hoping someone saw the email.&lt;/p&gt;

&lt;p&gt;Docs: &lt;a href="https://www.gonewatch.com/docs/alerts/github" rel="noopener noreferrer"&gt;GitHub Issues&lt;/a&gt; and &lt;a href="https://www.gonewatch.com/docs/alerts/linear" rel="noopener noreferrer"&gt;Linear tickets&lt;/a&gt;. Product: &lt;a href="https://www.gonewatch.com/" rel="noopener noreferrer"&gt;gonewatch.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>github</category>
      <category>linear</category>
      <category>devops</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>Don't just ping that the backup ran — send how long it took</title>
      <dc:creator>Gabrian Mak</dc:creator>
      <pubDate>Thu, 20 Aug 2026 14:31:01 +0000</pubDate>
      <link>https://dev.to/makgabri/dont-just-ping-that-the-backup-ran-send-how-long-it-took-4d6j</link>
      <guid>https://dev.to/makgabri/dont-just-ping-that-the-backup-ran-send-how-long-it-took-4d6j</guid>
      <description>&lt;p&gt;A heartbeat tells you the job ran. It does not tell you the dump took 3 minutes last week and 47 minutes tonight.&lt;/p&gt;

&lt;p&gt;I already POSTed after a successful backup. Adding a small JSON body on that same request was enough to keep duration and size next to the ping — without standing up metrics infra.&lt;/p&gt;

&lt;p&gt;Empty POST still counts. JSON is optional. Nested objects and log blobs are dropped on purpose. This is not log storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ping only on success, with a few scalars&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;# After backup.sh succeeds&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsS&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://www.gonewatch.com/api/heartbeat/YOUR_TOKEN &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"duration_ms":184320,"bytes":2147483648,"tables":42}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keys are yours. Typical ones from real jobs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;duration_ms — how long the run took&lt;/li&gt;
&lt;li&gt;bytes — how big the artifact was&lt;/li&gt;
&lt;li&gt;tables / rows / failed — whatever you already print at the end of the script&lt;/li&gt;
&lt;li&gt;Same idea in Node or Python: POST JSON, top-level numbers and strings only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What you get&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Last values on the monitor, plus a sparkline for each numeric field.&lt;/p&gt;

&lt;p&gt;duration_ms shows as time (184320 → 3m 4s). bytes shows as size (2147483648 → 2 GB). Other numbers stay grouped digits.&lt;/p&gt;

&lt;p&gt;If a key is nested, an array, or too large, that key is ignored. The ping still records. The job is still “up.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What not to send&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stdout, HTML, the backup file, PII, secrets. Keep the heartbeat URL itself secret — it is the credential.&lt;/p&gt;

&lt;p&gt;One URL per job still holds. Dump, file sync, and offsite copy are three different stories. Mixing them into one payload will not tell you which part got slow.&lt;/p&gt;

&lt;p&gt;Where I put it&lt;/p&gt;

&lt;p&gt;I wired this into &lt;a href="https://www.gonewatch.com" rel="noopener noreferrer"&gt;Gonewatch&lt;/a&gt; so the same monitor that alerts on silence also keeps last values and charts. Free to start.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>monitoring</category>
      <category>sparkline</category>
    </item>
    <item>
      <title>Get emailed if a cron job never ran</title>
      <dc:creator>Gabrian Mak</dc:creator>
      <pubDate>Wed, 19 Aug 2026 15:54:55 +0000</pubDate>
      <link>https://dev.to/makgabri/get-emailed-if-a-cron-job-never-ran-boo</link>
      <guid>https://dev.to/makgabri/get-emailed-if-a-cron-job-never-ran-boo</guid>
      <description>&lt;p&gt;A cron that never starts cannot email you. I found that out the hard way with a nightly database backup. I ended up hardcoding a ping that only fired after the dump finished. If the ping never showed up, the backup did not happen. Silent failure. No email from the job itself.&lt;/p&gt;

&lt;p&gt;Same class of bugs: crontab removed in a deploy, the box down at 2am, a lock file that never cleared, a script that exited before it did the real work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The pattern&lt;/strong&gt;&lt;br&gt;
Do not wait for the job to report failure. Expect a heartbeat after success. If the next one never arrives, that is the failure.&lt;/p&gt;

&lt;p&gt;This is not uptime monitoring. You are not polling a public URL. The job tells you it ran.&lt;/p&gt;

&lt;p&gt;Ping only when the script actually succeeded:&lt;br&gt;
&lt;code&gt;# Nightly job at 2:00 AM — ping only if backup.sh succeeded&lt;br&gt;
0 2 * * * /usr/local/bin/backup.sh &amp;amp;&amp;amp; curl -fsS -X POST https://www.gonewatch.com/api/heartbeat/YOUR_TOKEN&lt;/code&gt;&lt;br&gt;
&lt;em&gt;&amp;amp;&amp;amp;&lt;/em&gt; matters. A failed dump should not look healthy.&lt;/p&gt;

&lt;p&gt;One URL per job. Database dump, file sync, and offsite copy are three different things. If you fold them into one ping, you will not know which part died.&lt;/p&gt;

&lt;p&gt;Give yourself a grace window. A dump that runs 20 minutes late is not the same as a dump that never ran. Tune grace to how late the job can be without it being a problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt;&lt;br&gt;
GitHub emails a failed run. It does not email a scheduled workflow that never started. Last step, success only:&lt;br&gt;
&lt;code&gt;- name: Heartbeat&lt;br&gt;
  if: success()&lt;br&gt;
  run: curl -fsS -X POST "$HEARTBEAT_URL"&lt;br&gt;
  env:&lt;br&gt;
    HEARTBEAT_URL: ${{ secrets.HEARTBEAT_URL }}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I wrapped it in&lt;/strong&gt;&lt;br&gt;
I got tired of maintaining that ping by hand, so I put it in &lt;a href="https://www.gonewatch.com" rel="noopener noreferrer"&gt;Gonewatch&lt;/a&gt;. Same idea: create a monitor, paste the curl (or a tiny GitHub Action), get emailed if the ping stops. Free to start, no credit card.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>cron</category>
    </item>
  </channel>
</rss>
