Re: What happens to backround processes at midnight..?

Nov 12, 2023 Last reply: 2 years ago 4 Replies


In my Raspberry Pi I have processes ongoing i background. However they seems, for some reason..., to become disabled at midnight


> (at 00:00).
>
> For the time being I have to restart them, with crontab, at 00:01 every night. >
> /var/log/syslog does not give any clarification.
>
>
> Greatful for hints on how to solve the problem.

What sort of thing are these misbehaving processes?


Could some external process like the loss of internet connection or maybe timeout of a TCP connection be crashing them?

In my Raspberry Pi I have processes ongoing in background. However they seems, for some reason to stay enabled at midnight. So its a process specifiic problem, and since you give no detail. on the processes, its pretty hard to say why.

If they are managed by systemd look in ITS logs. Also consider if they have any code that cares about the time in them, and if it doesn't like going from e.g. 23:59 to 00:01.

Make them spew our debug info,

Are you using systemd with StandardOutput to invoke your process, and have log rotation set up? If so you probably aren't handling the HUP signal when the log file is rotated. Using CopyTuncate in the logrotate conf might solve the issue.

---druck

Have you had a look to see exactly what is run at set times and/or intervals?

Jobs defined in /etc/cron.* are run hourly, daily, weekly and monthly and are never automatically removed, i.e. thay are run at the specified intervals forever.

Scripts dropped into /etc/crontab are run pnce and then deleted.

Well it cant be a *general* issue, because I have a background daemon that controls 4 gpio ports as outputs and have been running now....

heating-controller:~ $ uptime 09:51:18 up 22 days, 21:44, 1 user, load average: 0.15, 0.07, 0.01

...clicking it's little relays.

So there is something specific to that program or how it is interacting with the hardware.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required