Mercurial > gemma
changeset 1738:8202d485331b
importschedule: set seconds constant 0
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 09 Jan 2019 16:51:21 +0100 |
parents | abcf21649bd1 |
children | 61fa62f01f20 |
files | client/src/components/importschedule/Importscheduledetail.vue |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importschedule/Importscheduledetail.vue Wed Jan 09 16:28:57 2019 +0100 +++ b/client/src/components/importschedule/Importscheduledetail.vue Wed Jan 09 16:51:21 2019 +0100 @@ -472,13 +472,13 @@ let getValue = value => { return this[value] ? this[value] : "*"; }; - if (this.cronMode === "15minutes") return "*/15 * * * *"; + if (this.cronMode === "15minutes") return "0 */15 * * * *"; const min = getValue("minutes"); const h = getValue("hour"); const dm = getValue("dayOfMonth"); const m = getValue("month"); const wd = getValue("day"); - return `${min} ${h} ${dm} ${m} ${wd}`; + return `0 ${min} ${h} ${dm} ${m} ${wd}`; }, validateBottleneckfields() { return !!this.url; @@ -504,10 +504,10 @@ this.cronString = this.currentSchedule.cronString; }, isWeekly(cron) { - return /\d{1,2} \d{1,2} \* \* \d{1}/.test(cron); + return /0 \d{1,2} \d{1,2} \* \* \d{1}/.test(cron); }, isMonthly(cron) { - return /\d{1,2} \d{1,2} \d{1,2} \* \*/.test(cron); + return /0 \d{1,2} \d{1,2} \d{1,2} \* \*/.test(cron); }, clearInputs() { this.minutes = null; @@ -551,8 +551,8 @@ if (!this.import_) return; let cron = this.cronString; if (this.easyCron) { - if (this.simple === "weekly") cron = "0 0 * * 0"; - if (this.simple === "monthly") cron = "0 0 1 * *"; + if (this.simple === "weekly") cron = "0 0 0 * * 0"; + if (this.simple === "monthly") cron = "0 0 0 1 * *"; } switch (this.import_) { case this.$options.IMPORTTYPES.BOTTLENECK: