<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Allan Zeidler on Medium]]></title>
        <description><![CDATA[Stories by Allan Zeidler on Medium]]></description>
        <link>https://medium.com/@allanzeidler?source=rss-2a9699d867ac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_KmZByE0gkom2-vw</url>
            <title>Stories by Allan Zeidler on Medium</title>
            <link>https://medium.com/@allanzeidler?source=rss-2a9699d867ac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:12:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@allanzeidler/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to be notified when lengthy command-line tasks are completed?]]></title>
            <link>https://allanzeidler.medium.com/how-to-be-notified-when-lengthy-tasks-are-completed-c94108780b1f?source=rss-2a9699d867ac------2</link>
            <guid isPermaLink="false">https://medium.com/p/c94108780b1f</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Allan Zeidler]]></dc:creator>
            <pubDate>Sun, 28 Dec 2025 02:07:57 GMT</pubDate>
            <atom:updated>2025-12-28T14:50:57.693Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSLSFcp5L7V49eUNKQ6BOQ.jpeg" /></figure><p><strong>Now you can step away from the computer and do other things after running a command that will undoubtedly take a long time</strong>… maybe have lunch, take a walk, play PS5, or even give some attention to your girl/partner :P</p><p>You know when you have a goal and within that goal, there are tasks that may take time, but you need to know as quickly as possible when each of these time-consuming tasks finishes? <strong>This usually happens when we are transferring huge files, compressing/decompressing files, running backup/restore routines, encryption, AI, etc.</strong></p><p>Of course, when we run these lengthy tasks, we don’t just stare at the terminal screen waiting; <strong>we go off and do other things. Well, other things, but still on the computer</strong>. After all, it’s essential to keep track of the task progress…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*98pDwZlp7ND5nOOLEn1njg.gif" /></figure><p>In the past, <strong>I used to place the terminal behind some window, just a little bit peeking out, waiting for the shell to return</strong> indicating that the task was finished.</p><p><strong>Now, I will do other things, including activities outside of the computer, and simply await an audible notification alert</strong> like the one shown at the beginning of the article.</p><p>After years of using a mobile solution for critical infrastructure alerts, I decided to utilize it to solve this problem.</p><p><strong>The app is called </strong><a href="http://pushover.net/"><strong>PUSHOVER</strong></a><strong> — but wait! I’ll show you how to set it up and share some tips I’ve learned</strong> <strong>to ensure the alerts function as they should</strong> (really alerting you instead of showing up and being ignored).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*wNJGdoIibrgMf7oeyZKXSw.jpeg" /></figure><p>I have thought about doing this many times, but I never acted on it until now, and today the idea has finally come to fruition… while waiting for a long task to finish… :)</p><p>Well, before we begin, I didn’t search for a free alternative to PUSHOVER, but it costs <strong>$4.99 LIFETIME (and it offers a 30-day trial)</strong>, come on, buddy? If it were $9.99, it would still be worth it; $19.99… okay, no…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*RgMJyH4Virni9Jiv3_M_XQ.gif" /></figure><p>I also haven’t tested the Android app, so if you’re an Android user, figure out how to make the adjustments I mentioned below on your device.</p><p>Just a reminder, this tutorial won’t go into the smaller details of configuration; you’ll have to manage that yourself :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*b1eOYih6iIKX_UHr4J9Uhg.gif" /></figure><h3>A Brief Explanation of How Pushover Works</h3><ol><li>Your configured Pushover devices receive PUSH notifications from the Pushover server.</li><li>When they do, they notify your apps. That’s it.</li><li>The notifications are sent to Pushover server via API through programming or by your unique pushover user e-mail.</li><li>Your user have a global <strong>User Key</strong> that is used ALWAYS.</li><li>And…. you create applications within Pushover to categorize the types of messages/services, etc. For example: Infrastructure Alerts App, Tasks Alerts App, etc. Each app has its own <strong>App Key</strong>.</li><li>By combining the <strong>UserKey + AppKey in your API call</strong>, you send the correct notification to your devices.</li></ol><h3>Step-by-step Guide</h3><h4>PART 1 — CONFIGURING PUSHOVER</h4><ol><li>Create an account on Pushover — Visit <a href="https://pushover.net/">https://pushover.net</a> and create your user account.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3hr_uImD7nWTK7hDYFF6w.jpeg" /></figure><p>2. Configure your devices — Install and set up the app on your mobile device (and even in your browser, if you want).</p><p>3. Create an App in Pushover</p><p>In the admin section, look for “Your Applications,” <strong>create a new application</strong> as desired, and save the App Key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*H8VHVzkO245xfb4RGu0B4w.jpeg" /></figure><p><strong>After creating it, you will have the App Key.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*gT_J_GtUuMDctvSE15TxPQ.jpeg" /></figure><h4>PART 2 — CREATING AND USING NOTIFICATIONS</h4><p>I’ve created scripts for Windows, Linux, and macOS. You will, of course, read the Pushover API documentation (<a href="https://pushover.net/api">https://pushover.net/api</a>), right?… and make your adjustments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Z1WU-aMt4y5fky3O-XZS6A.gif" /></figure><p><strong>Windows PowerShell</strong></p><pre>param (<br>    [string]$t,<br>    [string[]]$c<br>)<br><br>if (-not $t -or -not $c) {<br>    Write-Host &quot;Usage: script.ps1 -t &lt;title&gt; -c &lt;command&gt; [args]&quot;<br>    exit 1<br>}<br><br>$start = Get-Date<br>&amp; $c<br>$r = $?<br>$end = Get-Date<br><br>$elapsed = $end - $start<br>$message = &quot;{0:00}:{1:00}:{2:00}&quot; -f $elapsed.Hours, $elapsed.Minutes, $elapsed.Seconds<br><br>if ($r) {<br>    $t = &quot;SUCCEEDED: $t&quot;<br>} else {<br>    $t = &quot;FAILED: $t&quot;<br>}<br><br>$token=&quot;{{APP TOKEN}}&quot;<br>$user=&quot;{{USER GLOBAL TOKEN}}&quot;<br>$priority = &quot;1&quot;<br><br>Invoke-RestMethod -Uri &quot;https://api.pushover.net/1/messages.json&quot; -Method Post -Body @{<br>    token = $token<br>    user = $user<br>    priority = $priority<br>    title = $t<br>    message = $message<br>}<br><br>Write-Host<br>Write-Host &quot;Notification Sent!&quot;<br><br>exit ([int](-not $r))</pre><p>How to Use</p><pre>.\notify_pushover.ps1 -t &quot;Task title&quot; -c Long-Run-Command [params]</pre><p><strong>Linux</strong></p><pre>#!/bin/bash<br><br>if [[ -z &quot;$1&quot; || $# -lt 2 ]]; then<br>  echo &quot;Uso: $0 &lt;title&gt; &lt;command...&gt;&quot;<br>  exit 1<br>fi<br><br>token=&quot;{{APP TOKEN}}&quot;<br>user=&quot;{{USER GLOBAL TOKEN}}&quot;<br>priority=&quot;1&quot;<br>title=&quot;$1&quot;<br><br>shift<br><br>start_time=$(date +%s)<br>&quot;$@&quot;<br>exit_code=$?<br>end_time=$(date +%s)<br><br>elapsed=$((end_time - start_time))<br>printf -v message &quot;Duration %02d:%02d:%02d&quot; $((elapsed/3600)) $(( (elapsed%3600)/60 )) $((elapsed%60))<br><br>if [[ &quot;$exit_code&quot; -eq 0 ]]; then<br>  title=&quot;SUCCEEDED: $title&quot;<br>else<br>  title=&quot;FAILED: $title&quot;<br>fi<br><br>curl -s -X POST &quot;https://api.pushover.net/1/messages.json&quot; \<br>  -d &quot;token=$token&quot; \<br>  -d &quot;user=$user&quot; \<br>  -d &quot;priority=$priority&quot; \<br>  -d &quot;title=$title&quot; \<br>  -d &quot;message=$message&quot;<br><br>echo<br>echo &quot;Notification Sent!&quot;<br><br>exit $exit_code</pre><p>How to Use</p><p><em>I placed it in the PATH.</em></p><pre>notify_pushover &quot;Task title&quot; long_run_task --and --its-params</pre><p><strong>MacOS (bash POSIX-compliant version)</strong></p><pre>#!/bin/bash<br><br>if [ -z &quot;$1&quot; ] || [ $# -lt 2 ]; then<br>  echo &quot;Usage: $0 &lt;title&gt; &lt;command...&gt;&quot;<br>  exit 1<br>fi<br><br>token=&quot;{{APP TOKEN}}&quot;<br>user=&quot;{{USER GLOBAL TOKEN}}&quot;<br>priority=&quot;1&quot;<br>title=&quot;$1&quot;<br><br>shift<br><br>start_time=$(date +%s)<br>&quot;$@&quot;<br>exit_code=$?<br>end_time=$(date +%s)<br><br>elapsed=$((end_time - start_time))<br>printf -v message &quot;Duration %02d:%02d:%02d&quot; $((elapsed/3600)) $(((elapsed%3600)/60)) $((elapsed%60))<br><br>if [ &quot;$exit_code&quot; -eq 0 ]; then<br>  title=&quot;SUCCEEDED: $title&quot;<br>else<br>  title=&quot;FAILED: $title&quot;<br>fi<br><br>curl -s -X POST &quot;https://api.pushover.net/1/messages.json&quot; \<br>  -d &quot;token=$token&quot; \<br>  -d &quot;user=$user&quot; \<br>  -d &quot;priority=$priority&quot; \<br>  -d &quot;title=$title&quot; \<br>  -d &quot;message=$message&quot;<br><br>echo<br>echo &quot;Notification Sent!&quot;<br><br>exit $exit_code</pre><p>How to Use</p><pre>notify_pushover &quot;Task title&quot; long_run_task --and --its-params</pre><h4>PART 3 — CRITICAL ALERTS CONFIGURATION</h4><p>Finally, this type of task alert is indeed critical, and we want it to make noise; after all, you’re not going to be unzipping a backup in the cinema, right?…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*34JbdNmXms_PBVntygA0SQ.gif" /></figure><p><strong>For that, it’s crucial to push Pushover settings to be treated as Critical Notifications in the mobile OS and activate the sounds for these notifications on the OS.</strong></p><h4><strong>Important Settings for iPhone</strong></h4><p>Make the configurations below on your iPhone for Pushover to work correctly and for the alerts to sound at the end of tasks:</p><ul><li><strong>Settings &gt; Apps &gt; Pushover</strong></li><li><strong>Background App Refresh</strong>: ON</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Orl_tqoWIPuvaZJKaa7zjA.jpeg" /></figure><ul><li><strong>Settings &gt; Notifications &gt; Pushover</strong></li><li><strong>Enable ALL</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*nSiFP9-MQAxlUE49hSk4bA.jpeg" /></figure><p>This way, even if your phone is on silent mode, the messages will still sound.</p><h4>Settings on Pushover App</h4><p>In Pushover, go to the settings, which are hidden under this “&gt;” symbol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04f2Ebeo840jS2ZV7XOzPA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXQ4a_DU3n5ymtLsETeuOg.jpeg" /></figure><p><strong>Below, I will briefly explain some aspects of Pushover alerts.</strong></p><p>You will decide the priority of the alerts when sending the alerts via API; however, <strong>only HIGH and EMERGENCY can be used as CRITICAL, which is the alert that sounds even in silent mode.</strong></p><p>In Pushover, the <strong>difference </strong>between sending HIGH or EMERGENCY is that <strong>EMERGENCY will repeat the alert </strong>every specified number of seconds defined in the RETRY parameter (mandatory) for the total time in seconds defined in EXPIRE (also mandatory). For example, 60/1800 means it will send alerts every minute for 30 minutes if you do not acknowledge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wZQnzeQweag6GsulZMcKKg.jpeg" /></figure><h3>EXTRA TIP — OTHER USES FOR PUSHOVER</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*luEaximXwh3YB-9PZJKbMQ.gif" /></figure><p>I have been using Pushover since 2021, initially to receive alerts from Zabbix, which supports it natively.</p><p>In addition to continuing to use Zabbix, I also utilize it to generate alerts for issues in N8N flows, customer-paid sales, and whenever unexpected events occur in my infrastructure.</p><p>However, nowadays, with N8N, Make, and everything connected via API, the sky’s the limit. Youjust need to understand the API and configure your favorite apps that accept HTTP requests.</p><p>Well, everyone, that’s it for today. I hope you take advantage of these tips and optimize your time significantly!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c94108780b1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>