Re: python3 script not running as root

2018-11-15 Thread Markus Rosjat
Hi Marc, Am 15.11.2018 um 14:05 schrieb Marc Espie: 6.4, or snapshot ? there was an unveil snafu with doas a few days ago. 6.4 release -- Markus Rosjatfon: +49 351 8107224mail: ros...@ghweb.de G+H Webservice GbR Gorzolla, Herrmann Königsbrücker Str. 70, 01099 Dresden

Re: python3 script not running as root

2018-11-15 Thread Marc Espie
On Thu, Nov 15, 2018 at 09:36:45AM +0100, Markus Rosjat wrote: > Hi Martin and  Daniel, > > Am 15.11.2018 um 09:24 schrieb Martin Sukany: > >Hi, > > > >you'd fix this by defining PATH variable in your crontab, or specify the > >full path to python3 interpreter instead using env. > > > as daniel

Re: python3 script not running as root

2018-11-15 Thread Ken M
On Thu, Nov 15, 2018 at 09:36:45AM +0100, Markus Rosjat wrote: > as daniel also suggested I will try the the PATH crontab approach and this > is because scripts with a full path in the shebang seem to run anymore on > 6.4 > > regards > Yeah just checked my scripts I was referring to (they are

Re: python3 script not running as root

2018-11-15 Thread Ken M
On Thu, Nov 15, 2018 at 09:24:10AM +0100, Martin Sukany wrote: > Hi, > > you'd fix this by defining PATH variable in your crontab, or specify the > full path to python3 interpreter instead using env. > > M> > > As the others said, and to expand, it is probably from the shebang line of your

Re: python3 script not running as root

2018-11-15 Thread Markus Rosjat
Hi Martin and  Daniel, Am 15.11.2018 um 09:24 schrieb Martin Sukany: Hi, you'd fix this by defining PATH variable in your crontab, or specify the full path to python3 interpreter instead using env. as daniel also suggested I will try the the PATH crontab approach and this is because

Re: python3 script not running as root

2018-11-15 Thread Martin Sukany
Hi, you'd fix this by defining PATH variable in your crontab, or specify the full path to python3 interpreter instead using env. M> On 11/15/18 8:39 AM, Markus Rosjat wrote: Hi all, I have a python script to get some traffic stats from my machines and it is running without problems except

Re: python3 script not running as root

2018-11-15 Thread Daniel Gracia
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.

python3 script not running as root

2018-11-14 Thread Markus Rosjat
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