Good day ... working as a developer made me change my theme regularly, day and night, i have 2 themes "Light & Dark". i made a bash script to change the gtk-theme and shell-theme from cli, it works fine. However, when I issued the script via crontab, it fails to work and reports failure connecting to display and Dbus issues
here is my crontab
* * * * * DISPLAY=:0.0 /home/newton/scripts/dark-mode.sh
and here is my script
#!/bin/bash
export DISPLAY=:0.0
export WAYLAND_DISPLAY=wayland-0
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Vimix-Dark-Laptop-Ruby'
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Vimix-Dark-Laptop-Ruby'
Please help me solve this issue, i think it will be helpful to lots of people. Regards Mohammed Gritli