Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.