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
fi
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT | bash"* ]]; then
echo "*/7 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
if [[ $currentCron != *"* * * * * curl -s $VDMSCRIPT | bash"* ]]; then
echo "* * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi
# set the user cron
crontab -u $VDMUSER $VDMHOME/$ACTION.cron

View File

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