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:
parent
70cacd697b
commit
2a7ab4bbe7
4
getip.sh
4
getip.sh
@ -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
|
||||||
|
4
setip.sh
4
setip.sh
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user