0

I put command @reboot /home/user/script.sh in sudo crontab -e but it won't run, @reboot sleep 60 && sh /home/user/script.sh won't run either. already chmod 777 and -x it. im using hiveos(based on ubuntu 16.04) is there any other way to autorun script at reboot? I'm not sure what desktop environment is being used but it's not gnome so the usual .desktop at /.config/autostart cant be used. adding a line to /etc/rc.local also doesnt work. please help me out

  • Not sure if this helps your case, but one alternative to cron can be systemd and its timers. https://unix.stackexchange.com/questions/278564/cron-vs-systemd-timers – dungarian Oct 23 '21 at 04:01
  • What is your script attempting to do? Does your cron log indicate the script sin not running? Does the cron daemon mail any error messages etc. from the script to the root user? Note that if the script is trying to open windows etc., that there is no guarantee at all that a graphical user interface is up and running at reboot, and even if it were, the cron job would not intrinsically know about it. – Kusalananda Oct 23 '21 at 06:47
  • You have a lots of duplicates here. – Saboteur Oct 23 '21 at 17:22
  • my script is simply #!/bin/bash cd /home/user/chia-blockchain . ./activate chia start all && chia stop timelord-only sleep 666 && /home/user/TTDPoolClientLinux – dawnslayer Oct 24 '21 at 05:40

0 Answers0