I have the following issue: my 'hello world' python script can't be run by crontab.
If I set crontab instruction like this:
* * * * * cd /home/ && /usr/bin/python /home/hello.py
Text doesn't appear in terminal.
But if I do:
* * * * * cd /home/ && /usr/bin/python /home/hello.py >> /home/log.txt
Ubuntu appends 'hello world' text to log.txt
here is my script:
#!/usr/bin/env python
print('Hello World!')
What am I doing wrong?
P.S. already read this topic Why crontab scripts are not working?