On Oct 14, 2022 18:19, "Peter J. Holzer" <hjp-pyt...@hjp.at> wrote:
On 2022-10-14 07:40:14 -0700, Dan Stromberg wrote: > Alternatively, you can "ps axfwwe" (on Linux) to see environment > variables, and check what the environment of cron (or similar) is. It > is this environment (mostly) that cronjobs will inherit. The simplest (and IMHO also most reliable) way to find out the environment a cronjob has is to write a cronjob which just dumps the environment. ===== Lately I've been using systemd timers instead of cronjobs. They are easier to debug (journalctl) but require a bit more work to write. Systemd is available on Fedora & friends and Debian based systems, maybe more. It has no builtin MAILTO. I use an OnFailure stanza to send a Slack message with curl instead. https://www.freedesktop.org/software/systemd/man/systemd.timer.html https://unix.stackexchange.com/questions/278564/cron-vs-systemd-timers -- https://mail.python.org/mailman/listinfo/python-list