add to crontab with no duplicate Mar 17, 2024 • ulysses How to add to a crontab without creating duplicates. crontab -l | grep 'myscript.sh' || (crontab -l 2>/dev/null; echo "45 10 * * * /path/to/myscript.sh") | crontab -