service bots stop service bots start
*/5 * * * * /home/vps171-107/runcron.sh
How can I make runcron.sh stop then start the bots service in crontab ?
UPDATE
After the help from @armnotstrong , I've change the script to
/usr/sbin/service bots stop
/usr/sbin/service bots start
And it works!
It may be an env issue, crontab may execute the command with sh
not bash
try:
*/5 * * * * bash /home/vps171-107/runcron.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With