I have Debian stretch with systemd running (installed by default). I want to start a 2 lines bash script at boot via cron.
echo something > file.txt
xfce4-terminal [...] --command="watch [....]" 2>&1 &
the script works fine when launched manually: A window is opened and a 'watch' command is launched. I use use the first line to check if it's launched at boot (like a kind of stamp).
I have tried with root user and non root. I edited cron with crontab -e and vi (export VISUAL="vi")
@reboot /path/to/script/script.sh
At boot, the script is launched (I checked file.txt), but the window opened by xfce4-terminal is not there. And... 'Systemd' looks like big Berta for just launching a script at boot....
Any idea? thank you folks!
crontab -l
? Above all: use full paths for any command in a crontab (e.g./bin/bash /home/user/path/to/script
if the script is not executable by itself) – FelixJN Sep 22 '17 at 07:30