I’m assuming that you are using a cron job instead of Plasma’s slideshow to change the wallpaper because the image changes regularly, but the name of the file doesn’t. Here are 2 suggestions:
Cron (I haven’t tested this):
Make sure you put the full path to the executable & file (do not use ~ instead of /home/user/) in the job:
/usr/bin/plasma-apply-wallpaperimage /full/path/to/img.png
That may get it running (as I said, I haven’t tested it)
A better solution would be to set up a systemd timer (and I have just tested this successfully):
Create these 2 files (make sure you don’t misspell the names) & place them in your ~/.config/systemd/user/
directory:
wallchange.service:
[Unit]
Description=A job to change the Plasma desktop wallpaper every 3 hours using a fixed-path file
[Service]
Type=simple
# Executable must be full path; the same with the image path. Do not use ~ as replacement for /home/user/
ExecStart=/usr/bin/plasma-apply-wallpaperimage /full/path/to/img.png
#[Install]
#WantedBy=default.target
wallchange.timer (edit as required):
[Unit]
Description=A job to change the Plasma desktop wallpaper every 3 hours using a fixed-path file
# Allow manual starts & stops
RefuseManualStart=no
RefuseManualStop=no
[Timer]
#Execute job if it missed a run due to machine being off
Persistent=false
#Run 15 minutes after login for the first time
OnStartupSec=15 min
#Run every 3 hours thereafter - comment out line below if using OnCalendar
OnUnitActiveSec=3h
#Run at 40 minutes past the hour at 3-hour intervals - comment out line below if using OnUnitActiveSec
#OnCalendar=00/3:40
#File describing job to execute
Unit=wallchange.service
[Install]
WantedBy=timers.target
Once you have those 2 files in your ~/.config/systemd/user/
directory run the following command as a regular user (don’t use sudo - it isn’t needed for your personal systemd jobs):
systemctl --user enable --now wallchange.timer
Your wallpaper should change immediately & continue to be changed according to the time interval you have set. The timer will start automatically 15 minutes after you login. You can check it is active via:
System Settings > Systemd > Timers
Also, whenever you make any changes to systemd .service or .timer scripts you should then run (without sudo) systemctl --user daemon-reload
to send the changes through to systemd.
Useful resources:
Systemd Timers for Scheduling Tasks - Fedora Magazine
Systemd timers onCalendar (cron) format explained
Edit: added advice to reload the daemon when changes to timers/services are made