Skip to content

app randomly quits after a while #132

@johan456789

Description

@johan456789

The app seemly randomly quits after a while. I wrote a script to monitor.

Click to view the script.
#!/bin/bash

APP_NAME="Clocker"

echo "Monitoring for $APP_NAME. Press Ctrl+C to stop."

while true; do
    # Wait for Clocker to launch
    PID=""
    while [ -z "$PID" ]; do
        PID=$(pgrep -i "$APP_NAME")
        sleep 1
    done

    NOW=$(date +"%Y-%m-%dT%H:%M:%S")
    echo "$NOW Detected $APP_NAME running (PID: $PID)"

    # Wait for Clocker to exit
    while kill -0 $PID 2>/dev/null; do
        sleep 1
    done

    NOW=$(date +"%Y-%m-%dT%H:%M:%S")
    echo "$NOW $APP_NAME (PID: $PID) exited"
    say "$APP_NAME has exited"
done

I don't see any pattern and can't tell why it randomly quits. Is there a log stored somewhere I can share?

2025-09-24T21:10:17 Detected Clocker running (PID: 30830)
2025-09-27T00:21:00 Clocker (PID: 30830) exited
2025-09-27T04:32:23 Detected Clocker running (PID: 85727)
2025-09-28T04:38:20 Clocker (PID: 85727) exited
2025-09-28T04:38:36 Detected Clocker running (PID: 85091)
2025-09-28T13:22:36 Clocker (PID: 85091) exited

Clocker - World Clock v24.03 (113)
macOS 15.6.1 (24G90)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions