TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to monitor periodic short-lived processes?

4 点作者 sharmi将近 3 年前
Hi HN,<p><pre><code> We are two founders starting up a business. We need to run multiple programs everyday (around 25) that will be run periodically. They are not always alive though and will often be done in 10 minutes to an hour. </code></pre> Unfortunately as a two person company, keeping track of all the programs&#x27; statuses is hard.<p>Is there a way to keep track (and if possible, also spawn them on schedule) of the processes and give regular updates? Like a dashboard of sorts, that can show which programs have been running successfully and which have failed to finish or didn&#x27;t start?

3 条评论

DamonHD将近 3 年前
For a *nix box, the simple&#x2F;historic way has been to run the tasks from cron and append log output from them to text files or the system logs. If you really mean statuses, as in exit statuses, wrap the programs in shell scripts which print out the programs&#x27; exit codes.<p>It&#x27;s unfashionable these days I think, but still works for me.
2143将近 3 年前
You might have to come up with something custom.<p>Here&#x27;s one idea:<p>1. Wrap your processes in systemd services or something similar, where it&#x27;s possible to determine the status by pinging it.<p>2. Write a script to periodically (via cron maybe) ping all relevant services, and store the statuses somewhere (file, DB..)<p>3. Another script (or the previous one) to read the data from 2 and spit it to a locally served webpage.<p>&gt; if possible, also spawn them on schedule<p>Cronjobs.
评论 #32234451 未加载
verdverm将近 3 年前
Cron is the term you are looking for and there are many options. As another commenter said, there are Linux system level solutions. There are also Cron concepts in kubernetes, aws lambda, zapier. If they don&#x27;t have a dashboard, I&#x27;m sure there is another SaaS that does and plenty of open source solutions for that as well
评论 #32234069 未加载
评论 #32233790 未加载