---------- Post updated at 04:59 PM ---------- Previous update was at 04:55 PM ----------
Thanks,
If we include something inside of double-quotes, everything loses its special meaning except for the variable operator ($), the back-slash (\), the back-tick (`), and the double-quote itself.
We don't know what Operating System or Shell you have so this solution may not work.
Maybe you mean:
echo "*/7 * * * * \"/root/${Service_Name}.sh 2>&1 >dev/null\""
Which produces the line:
*/7 * * * * "/root/Linux CPU (EDF).sh 2>&1 >dev/null"
However. You will be well advised to avoid brackets and spaces in the filenames of shell scripts because they will drive you nuts!
I have omitted the append because the root crontab is more usually:
/var/spool/cron/crontabs/root
As hinted at earlier it is much safer to copy the crontab twice (once with a date extension and again under its correct name) to a work directory before editing the copy of "root" and then with the work directory as the current working directory publishing the edited version with "crontab root". Never issue "crontab root" unless you are in the directory containing your new crontab or the command will wipe your root crontab.