Why in crontab does not run the shell script?

There is a script:
CHECK='server-release is not running ... failed!' #test string
STATUS=$(/home/user/server/server/build.sh status) #write the status of the server in a variable
if [ "$CHECK" == "$STATUS" ] 
 echo "server is stopped"
 rm-f /home/user/server/server/server.pid
 /home/user/server/server/build.sh startd
 echo "server is worked"

If you just run the script /etc/starter.sh then everything works fine, conditions are met, the script build.sh the same runs. A crontab entry did: sudo crontab -e in the crontab prescribed:

* * * * * bash /bin/bash /etc/starter.sh > /tmp/starter.log 2>&1

logs in /tmp/starter.log
/bin/bash: /bin/bash: cannot run binary file

How to make an entry in crontab to have this script run every minute?
April 19th 20 at 12:09
1 answer
April 19th 20 at 12:11
And so ?
* * * * * /bin/bash /etc/starter.sh > /tmp/starter.log 2>&1

And the same question why do you check text not code completion?
bred, thanks.
Half a day spent, it was necessary only to remove bash ( - Kaya commented on April 19th 20 at 12:14
yeah it happens , it is something that you specify the full path to the bash because Kron does not have the environment variable shell, and therefore does not run the command from bin by default.
But you have not answered the question why so difficult to check ? - keshawn_Hacke commented on April 19th 20 at 12:17
@keshawn_Hackehere somewhere I found a similar problem, actually, and from there took the extra bash and the log output) I know a little cron, bash is also still under consideration, unfortunately. - Kaya commented on April 19th 20 at 12:20

Find more questions by tags The task schedulersDebianbash