I have a cronjob to run a script at startup, which i created using crontab -e
@reboot /home/ubuntu/startup.sh > /home/ubuntu/log.log 2>&1
My startup.sh
script contains:
#!/bin/bash
...
bash /home/ubuntu/ec2-script.sh
and my ec2-script.sh
contains:
spark-submit
But i'm getting spark-submit: command not found
. If I try from terminal, it is working perfectly fine. But when the script runs at boot up, it is unable to find spark-submit
command. I try to put sleep as well, so the spark starts properly, but it doesn't help. It would be great help if someone points out what is wrong or missing.