0

I must be doing something ridiculously wrong here, but I'm not seeing it.

I want to run:

python3 /home/web/Code/python/hourly-script.py

Which runs from the command fine, it displays a notification popup.

In crontab -e I put:

* * * * * python3 /home/web/Code/python/hourly-script.py

To test it running, I should get a popup every 1 minute. I dont get any popups.

From the command line, when I run grep CRON /var/log/syslog I get:

Dec 17 07:44:01 web-XPS-15-9570 CRON[16643]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)
Dec 17 07:45:02 web-XPS-15-9570 CRON[16879]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)
Dec 17 07:46:01 web-XPS-15-9570 CRON[17114]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)
Dec 17 07:47:01 web-XPS-15-9570 CRON[17489]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)
Dec 17 07:48:01 web-XPS-15-9570 CRON[17988]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)
Dec 17 07:49:01 web-XPS-15-9570 CRON[18287]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)
Dec 17 07:50:01 web-XPS-15-9570 CRON[18544]: (web) CMD (python3 /home/web/Code/python/hourly-script.py)

Which would indicate that its running every minute, so why am I not seeing a popup?

I'm running on ubuntu. The python file itself is executable:

-rwxrwxr-x 1 web web 148 Dec 17 07:34 hourly-script.py

muru
  • 207,228

1 Answers1

1

The cronjob is in fact firing, but as my limited research goes (running a Minecraft server with cron), cronjobs do not output to the default CLI, TTY or GUI. To get the output, you need to give the popup a location to pop up, which will be the GUI. This probably needs to be done in your script, although I do not know how.

Irsu85
  • 611