adding cron’s to crontab from a script

so i needed to add things to a couple of boxes without completely killing off the existing crontab from a script. i came up with this: TMP_FILE=$(mktemp –tmpdir cron.$$.XXXXXXXXXX) crontab -l > ${TMP_FILE} echo ‘# * * * * * script’ >> ${TMP_FILE} crontab ${TMP_FILE} rm -rf ${TMP_FILE} it will take a copy of the … Read More