handle @reboot
This commit is contained in:
parent
d2b3a7bdf2
commit
547b1ded61
1 changed files with 6 additions and 2 deletions
|
@ -8,6 +8,8 @@
|
||||||
export let value
|
export let value
|
||||||
let error
|
let error
|
||||||
|
|
||||||
|
const reboot = "@reboot"
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
const exists = CRON_EXPRESSIONS.some(cron => cron.value === value)
|
const exists = CRON_EXPRESSIONS.some(cron => cron.value === value)
|
||||||
const customIndex = CRON_EXPRESSIONS.findIndex(
|
const customIndex = CRON_EXPRESSIONS.findIndex(
|
||||||
|
@ -22,7 +24,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const onChange = e => {
|
const onChange = e => {
|
||||||
error = helpers.cron.validate(e.detail).err
|
if (value !== reboot) {
|
||||||
|
error = helpers.cron.validate(e.detail).err
|
||||||
|
}
|
||||||
if (e.detail === value || error) {
|
if (e.detail === value || error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -57,7 +61,7 @@
|
||||||
if (!$flags.cloud) {
|
if (!$flags.cloud) {
|
||||||
CRON_EXPRESSIONS.push({
|
CRON_EXPRESSIONS.push({
|
||||||
label: "Every Budibase Reboot",
|
label: "Every Budibase Reboot",
|
||||||
value: "@reboot",
|
value: reboot,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue