AFAIK cron won't spawn a login shell, so there are no 'env' variables
to start with. You could import a user's profile from the crontab and
get done with that (0 5 * * * . $HOME/.profile;
/path/to/command/to/run) but IMO best practice would require you to
set any variables in your cron script.

Regards!
El jue., 15 nov. 2018 a las 8:44, Markus Rosjat (<[email protected]>) escribió:
>
> Hi all,
>
> I have a python script to get some traffic stats from my machines and it
> is running without problems except for a new installed OpenBSD 6.4
> machine. There I get following error:
>
> env: python3: No such file or directory
>
> This only happens when the cronjob is running when I run it from
> terminal with doas it works. That is kinda odd sice both root and my
> user have python3 and env in there $PATH at least the path to the
> executable.
>
> some hints would be appreciated.
>
> regards
>
> --
> Markus Rosjat    fon: +49 351 8107224    mail: [email protected]
>
> G+H Webservice GbR Gorzolla, Herrmann
> Königsbrücker Str. 70, 01099 Dresden
>
> http://www.ghweb.de
> fon: +49 351 8107220   fax: +49 351 8107227
>
> Bitte prüfen Sie, ob diese Mail wirklich ausgedruckt werden muss! Before you 
> print it, think about your responsibility and commitment to the ENVIRONMENT
>

Reply via email to