Created
August 26, 2017 13:49
-
-
Save judeebene/345a48c6d2800965741ac42b16a97d86 to your computer and use it in GitHub Desktop.
A simple cron job task to check if the app is top and start app in digital ocean every one hour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# check if the bot is running | |
# ps auxw | grep "make run" | grep -v grep | |
# make run is the process to check , you can replace with a proces | |
if !(ps auxw | grep "make run" | grep -v grep) | |
then | |
/usr/bin/make -f ./Makefile run | |
fi | |
# use crontab -e to set the cron job | |
* 1 * * * /bin/sh/root/autoadd_bot/bot_launch.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment