You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we have some thinstations running I would like to get the serial number and model from the screens,
and write that to an inventory database. We have about 100 thinstations with dual screen. ( View Horizon)
With python pedid this is no big deal, doing it from terminal.
But I did not figured out to run in the scheduled task or service.
Technical I did but with a test I figured out that xrandr did not create output if i is running
as a crontab job.
It has only to run once per day or restart.
Any suggestions and ideas? In pedid the xrandr output is parsed.
The text was updated successfully, but these errors were encountered:
Perhaps as a cronjob, the DISPLAY variable is not available.
You could make a script, create a service file and a timer file for that service.
Creating the Service File
Create a systemd service file (example.service) that specifies what command or script you want to run. Here’s a basic template:
Replace /path/to/your/script.sh with the path to your script or command.
Creating the Timer File
Next, create a systemd timer file (example.timer) to schedule the service. Here’s how you can set it up to run once a day:
[Unit]
Description=Runs the Daily Task Service once a day
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
This timer activates the service once a day at midnight. The Persistent=true option ensures that the task will be executed once the system is up if it was down at the scheduled time.
Finally, in some finalize script, you will want to enable the timer.
As we have some thinstations running I would like to get the serial number and model from the screens,
and write that to an inventory database. We have about 100 thinstations with dual screen. ( View Horizon)
With python pedid this is no big deal, doing it from terminal.
But I did not figured out to run in the scheduled task or service.
Technical I did but with a test I figured out that xrandr did not create output if i is running
as a crontab job.
It has only to run once per day or restart.
Any suggestions and ideas? In pedid the xrandr output is parsed.
The text was updated successfully, but these errors were encountered: