Il 19/12/20 17:28, Brian Reichert ha scritto:
On Fri, Dec 18, 2020 at 07:21:24PM -0300, Marco Calistri wrote:
Il 18/12/20 16:40, Brian Reichert ha scritto:
Below is the signature generated by script I add into the cron job: Try running your script with s cleared environment and a new non-login shell:
env - /bin/sh /etc/cron.hourly/myjob
I've not understood what you mean with "new non-login shell". What I meant was that your shell, when you are running that script, is a login shell, and when you've logged in all sorts of magic has fired to set up your environment, configure shell macros, alter your PATH, etc.
Look at the man pagwefor bash, under the section named 'INVOCATION'.
(Now that I'm reading it myself, 'interactive' also fires extra logic.)
The point is, a shell script invoked by cron has a shell with a different configuration that you having interavively logged into your host.
Got it! Regards, -- Marco Calistri Build: openSUSE Tumbleweed 20201216 Kernel:5.9.14-1-default