1

I need to open one (or more) browser tab periodically and I decided to use cron.

The command in the shell (bash) that correctly executes this task is chromium-browser http://mysite.com. If I type it, the browser opens the site in a tab.

But the same command inserted as a task in the crontable doesn't work.

If I redirect the output of other simple commands in the crontable in a file they work correctly, say

echo "hello world" > /home/user/file

So, shall I redirect the output of the command chromium-browser http://mysite.com to my graphic interface? If yes, which would be the device?

0

1 Answer 1

3

i added the following to my crontab by typing crontab -e and it worked

* * * * * env DISPLAY=:0 google-chrome www.github.com

My chrome browser opened www.github.com every minute. So the following should work for you.

* * * * * env DISPLAY=:0 chromium-browser http://mysite.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .