This question already has an answer here:
I'm trying to create my first cron job. I'm new to bash scripting too, although I do know some python. I am puzzled by the following:
Here is my cronjob file created with
*/1 * * * * /home/darren/.bash_scripts/urxvt_colors.sh
#!/bin/bash python ~/.Py_Scripts/xr_random_colors.py xrdb ~/.Xresources
Here is what baffles me. So the python part of the cron job works
python ~/.Py_Scripts/xr_random_colors.py is executed every minute. This python script changes the color scheme in my
~/.Xresources file. I confirmed this actually happens by checking every minute. But
xrdb ~/.Xresources does not update the file.
which python shows
which xrdb shows
/usr/bin/xrdb. So since they are both executed from
/usr/bin, how come only the python script executes?
Also if I run
./urxvt_colors.sh script manually from my terminal then it works as expected, the python script runs and so does
What's happening here?