Add script as cronjob

When you want to add a bash shell script to the local cronjob scheduler to run every minute

#!/bin/bash
THE_SCRIPT=<path_to_shell_script>
sudo chmod -R 755 $THE_SCRIPT
croncmd="$THE_SCRIPT > /tmp/the_script.log 2>&1"
cronjob="* * * * * $croncmd"

( crontab -l | grep -v -F "$croncmd" ) | crontab -
( crontab -l | grep -v -F "$croncmd" ; echo "$cronjob" ) | crontab -