I'm new to shell scripting, i want the command to be in running always.
My .sh file - startscrapy.sh
#!/bin/bash
echo "Scrapyd is started now"
scrapyd
i have changed the permission also chmod +x etc/init.d/startscrapy.sh
I have placed this file in etc/init.d but it is not working.
My understanding as of now " the location etc/init.d
is to run the .sh files
whenever the server or system boots up but i want my .sh file to be running state always.
Using crontab
you can easily auto start any scripts in ubuntu.
Please do the following steps,
crontab -e
so that you can edit the crontab.@reboot sudo
<script>
in your case it should be @reboot sudo scrapyd
.Hope it Helps.