If I understand your question correctly, you could use additional setting
EDIT: just noticed that this might not be what you wanted.
Anyway, try these commands:
EDIT2: another way to run stuff at login is to write an autostart file into folder /etc/xdg/autostart. They are traditional .desktop files that run at login. I think @pebcak already was going this way.
Thank you pebcak and manuel for your guidance. I suspected as much that I am gonna need the autostart file of openbox. That is how EndeavourOS/Openbox “restores” the wallpaper when the user logs in. It’s just that I wanted all the “config” for the wallpaper setup to be at one place but anyway this is what I ended up doing:
The rand-wall service and timer files are as they are in ~/.config/systemd/user. I enable the timer with systemctl --user enable --now rand-wall.timer. It will take care of changing the wallpaper every hour.
Now for setting the wallpaper every time I log in, I go to ~/.config/openbox/ and edit the autostart file as: