I use a website to order food, and I would like this website to be automatically opened in the browser at 11 am day.

I opened crontab using "crontab -e" and tried this:

59 10 1-31 1-12 SUN,MON,TUE,THU google-chrome --new-window http://food.com

and also tried this:

59 10 1-31 1-12 SUN,MON,TUE,THU x-www-browser http://food.com

But they sent me an email instead of opening the website:

(x-www-browser:16597): Gtk-WARNING **: cannot open display:
(google-chrome:16883): Gtk-WARNING **: cannot open display:

Thanks!


Update: The solution was adding "export DISPLAY=:0 &&" to crontab. i.e.:

53 10 * 1-12 SUN,MON,TUE,THU export DISPLAY=:0 && google-chrome --new-window http://www.foodsite.com
Edit
Report