1
0
mirror of https://github.com/namibia/demo-sync.git synced 2024-11-22 03:25:09 +00:00

run cron jobs every minute

This commit is contained in:
Llewellyn van der Merwe 2017-07-25 12:36:58 +01:00
parent 70cacd697b
commit 2a7ab4bbe7
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
2 changed files with 4 additions and 4 deletions

View File

@ -125,8 +125,8 @@ function setCron () {
echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi fi
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT | bash"* ]]; then if [[ $currentCron != *"* * * * * curl -s $VDMSCRIPT | bash"* ]]; then
echo "*/7 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron echo "* * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi fi
# set the user cron # set the user cron
crontab -u $VDMUSER $VDMHOME/$ACTION.cron crontab -u $VDMUSER $VDMHOME/$ACTION.cron

View File

@ -118,8 +118,8 @@ function setCron () {
echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi fi
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
if [[ $currentCron != *"*/5 * * * * curl -s $VDMSCRIPT | bash"* ]]; then if [[ $currentCron != *"* * * * * curl -s $VDMSCRIPT | bash"* ]]; then
echo "*/5 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron echo "* * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi fi
# set the user cron # set the user cron
crontab -u $VDMUSER $VDMHOME/$ACTION.cron crontab -u $VDMUSER $VDMHOME/$ACTION.cron