0

The following crontab entry doesn't work:

 * * * * if pgrep wine || pgrep -f minecraft; then systemctl stop nbminer; else systemctl start nbminer; fi

But if I put the exact command in a bash script and then use it in the crontab it works:

 * * * * /home/braulio/gitconfig/scripts/minerctl

At the beginning of the crontab I'm using SHELL=/bin/bash, but it doesn't help.

Anything am I missing?

brauliobo
  • 188

0 Answers0