On Thu, 12 Nov 2026 13:34:27 +0000, NY wrote:
The script runs fine - all the logging stuff is OK. But it seems
that "node" does not like running as a background job any more when
invoked from a cron job as opposed to a terminal session.
What exactly is the error?
The reason it's run from a cron job is that it has a habit of
crashing every so often (no idea why, and writer of the app doesn't
reply to emails) so I run it from cron every 5 minutes to restart it
if it has stopped.
I would do this via a systemd service definition. That provides
automatic monitoring and restarting if/when it crashes (up to some
reasonable limit, to guard against endless loops). And any error
messages should appear in the journal as well.
--- PyGate Linux v1.5.19
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)