Created
December 3, 2018 03:14
-
-
Save kevenli/ee594642c3d6a4ea3c88ffa2647e8aed to your computer and use it in GitHub Desktop.
add cron task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command="php $INSTALL/indefero/scripts/gitcron.php" | |
job="0 0 * * 0 $command" | |
cat <(fgrep -i -v "$command" <(crontab -l)) <(echo "$job") | crontab - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from https://stackoverflow.com/questions/878600/how-to-create-a-cron-job-using-bash-automatically-without-the-interactive-editor