Created
September 15, 2022 20:08
-
-
Save luukverhoeven/2a05963dd0adb8981cbd7afe26cdf1d6 to your computer and use it in GitHub Desktop.
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
if [[ $(crontab -l | grep -q '/public_html/admin/cli/cron.php'; echo $?) == 1 ]] | |
then | |
crontab -l >/tmp/crontab.tmp | |
echo -e '\n* * * * * /usr/bin/php7.4 ~/public_html/admin/cli/cron.php > /dev/null 2>&1' >>/tmp/crontab.tmp | |
crontab /tmp/crontab.tmp | |
rm /tmp/crontab.tmp | |
echo 'Installed the crontab' | |
else | |
echo 'Skip the crontab installation, already there' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment