This question already has an answer here:
I'm sorry for creating this thread, but i cant solve this issue myself.
I want crontab to execute basic command "xrandr --auto"
I've created an test.sh file that looks like this.
#!/bin/bash xrandr --auto
After I have added following line to
crontab -e, I used default nano editor.
*/2 * * * * /home/dashboarduser/test.sh
Also tried like this
*/2 * * * * root /home/dashboarduser/test.sh
It does not work, I don't know why.
After some searching found this command
grep CRON /var/log/syslog to see the contents of cron logfile.
Dec 12 14:06:01 : (dashboarduser) CMD (root /home/dashboarduser/test.sh # JOB_ID_1) Dec 12 14:06:01 : (CRON) info (No MTA installed, discarding output)
If i run my script in terminal ->
/home/dashboarduser/test.sh it works fine.
Thanks in advance.