0

In the terminal, I ran:

crontab -e

Then I added the following cronjob in the file

26 21 * * * /usr/bin/xbacklight -set 80

This was supposed to set the brightness to 80% at 9:26 PM. But its not working. I have tried this command in the terminal directly and it's working. Also, I added another cron job to open cheese at at a particular time and it's working fine. What should I do to fix this?

  • which user is running this cronjob? is it the same one which you were using to run it manually? – fedorqui Dec 8 '15 at 12:25
  • yes, the user is same – Vishal Sharma Dec 9 '15 at 10:05
0

I was also trying something similar and came across this thread. And I solved it. The problem is that you didn't set the DISPLAY variable first to set the brightness value.

Try:

26 21 * * * DISPLAY=:0 /usr/bin/xbacklight -set 80

You may check the DISPLAY variable on the terminal using:

echo $DISPLAY

Happy Croning!

Source: http://ubuntuforums.org/showthread.php?t=2189629

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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