I have following two line of commands that needs to be run when the computer starts:

killall syndaemon 
syndaemon -i 0.5 -KRd

I created one entry in startup application and added following command:

killall syndaemon & syndaemon -i 0.5 -KRd

But it doesn't get executed.

Tried putting the sleep for few seconds also in the command but no luck.

  • If it works from terminal, it definitely works with a break form startup, but most likely your break is too small, making it overruled after your break. Try 15 seconds, making it smaller until you have your limit. This is typically such a command. – Jacob Vlijm Feb 27 '17 at 16:42
  • Rajeev, please post the exact command you used, setting the break. The correct format is in the link I provided, but just to check. – Jacob Vlijm Feb 27 '17 at 19:34
  • @JacobVlijm - I tried the answer that was suggested in provided link above but still it didn't work. – Rajeev Jayaswal Feb 27 '17 at 20:47
  • Rajeev, again, please post the exact command you ran including break. – Jacob Vlijm Feb 27 '17 at 20:51
  • @JacobVlijm, I tried following command: /bin/bash -c "sleep 15 && killall syndaemon & syndaemon -i 0.5 -KRd" – Rajeev Jayaswal Feb 28 '17 at 9:27

Just add a crontab entry, writing down "@reboot" as the time:

@reboot /usr/local/my_script.sh

Source: Cyberciti

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.