To my understanding, the commands are the same in terms of "what they do", 
i.e start weewx.
The difference lies in how easy it is to manage weewx.

1. If you use weewx as a service, you can easily start/stop/restart/mask 
(etc) your service with the systemctl commands. This includes for example 
restarting weewx if it has stopped. Also, you can ensure at boot time that 
weewx only tries to start once your host has network for example.

2. Crontab. IMHO, a crontab is useful to start periodic tasks, like "do a 
backup at 5am". If your idea is to use a crontab just to start weewx at 
boot time, the /etc/rcX.d directories are probably better suited. If you 
want the crontab to periodically check weewx is running and restart it if 
it's down, then yes, you can do it with the crontab, but you'll  have to 
write the script that detects weewx is up or down and restart if necessary. 
This is automatically handled by the systemctl service configuration, so 
you are kind of re-inventing the wheel IMHO.

3. nohup weewxd. This works and it's sometimes handy because it's simple 
and easy to debug. But if your weewx dies for some reason, you have no way 
to restart it. Also, it's not that easy to see if you already have a weewxd 
running (you'll  have to do "ps aex" and grep for example) so you might 
launch several instances by error. Finally, the logs go where you launched 
the command, they are not centralized in journalctl like systemctl option, 
or in /var/log/syslog.

Hope it helps. There might be other differences I am missing.

On Sunday, March 3, 2024 at 8:45:50 PM UTC+1 Remy Lavabre wrote:

> Good morning,
>
> Small question(s) for a PIP installation:
>
> 1/ Is there a difference between:
> - the use of the weewx daemon
> - the weewxd command placed in the contrab at the RPi starting
> - the manually typed command "nohup weewxd &"?
>
> 2/What is the interest/advantage of one method compared to others?
>
> THANKS
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ef65ad2a-16cf-4b99-933d-cda74173f096n%40googlegroups.com.

Reply via email to