When I am login as a user (lets say: John) to may linux (Ubuntu 18), I run the command:
crontab -e
I then entered a simple command:
python pythonFile.py
I was expecting the job to run under user "John" but insted, when running:
ps -ef|grep pythonFile
I see the job running under root. I can't understand why.
Thanks for any help.
crontab -e -u <username>
(as root) - I couldn't tell you why it's doing that though - unless it's specific to Ubuntu, or python wants to run as root (?)crontab -l -u <username>
(as root) - see if it is definitely in the user crontab and just running as root for some reason. If you run it manually, does it run as your user or root?