Hi,
I’am running a raspberry pi 4, 2 Gb, OS bookworm.
I’am trying to configure a cron job that shuts down the output too the HDMI port.
I created a specific user (not pi) when installing the OS on the raspberry.
I used crontab -e to create my first cron job under that user.
I changed the cron file by adding the following lines:
* * * * * wlr-randr —output HDMI-A-1 —off
* * * * * wlr-randr —output HDMI-A-1 —on
The code works when activated manualy.
The first two stars I update with the time I want to start the job for testing. First minutes then hours.
Then use ctrl-o, enter, ctrl-x
After waiting for the time that was set nothing happens.
I also tried creating two executable files HDMIoff.sh and HDMIon.sh
It works running these by hand.
I am sure I mis something essential probably but can not figure out what.
I read the cron.pdf but can not find a solution in there.
What do I do wrong? I hope I gave the necessary input to help me on this. Can this not being run under a specific user maybe?
I’am running a raspberry pi 4, 2 Gb, OS bookworm.
I’am trying to configure a cron job that shuts down the output too the HDMI port.
I created a specific user (not pi) when installing the OS on the raspberry.
I used crontab -e to create my first cron job under that user.
I changed the cron file by adding the following lines:
* * * * * wlr-randr —output HDMI-A-1 —off
* * * * * wlr-randr —output HDMI-A-1 —on
The code works when activated manualy.
The first two stars I update with the time I want to start the job for testing. First minutes then hours.
Then use ctrl-o, enter, ctrl-x
After waiting for the time that was set nothing happens.
I also tried creating two executable files HDMIoff.sh and HDMIon.sh
It works running these by hand.
I am sure I mis something essential probably but can not figure out what.
I read the cron.pdf but can not find a solution in there.
What do I do wrong? I hope I gave the necessary input to help me on this. Can this not being run under a specific user maybe?
Statistics: Posted by ChrisMeijer — Tue Apr 09, 2024 5:29 pm