Raspberry Pi 4 Cronjob Not Working

July 17, 2024, 16:24

banggfordayz

Hello, I have a project I am doing for my job where I have to setup multiple Raspberry Pi 4's as Displays for websites. I have gotten to the point of the pi's displaying the websites in full-screen as intended, however the displays were not refreshing as the website changed. After some research I found that a cronjob with xdotool pressing "ctrl+F5" would be my best bet. I used the command "crontab -e" to open cron and added the line: /5 * xdotool key "ctrl+F5" This is intended to refresh the screen every 5 minutes on the clock, but it does not seem to do so. I checked using systemctl status and found that cron is running and active. Anyone know where i could have gone wrong?

thunder07337

You have to write the function in a script and then execute the script every 5 minutes.

banggfordayz

i actually figured it out right after posting this. You actually don't have to do that. xdotool didnt know which display to write to, i added a command before it to specify the display and it works.

banggfordayz

but thank you