mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 08:02:18 +00:00
Glm/fix cron builder (#4566)
* fix cron expression * fix cron builder * Fix prefilled schedule --------- Co-authored-by: Guilhem <guilhem@mbp-de-windmill.home>
This commit is contained in:
@@ -112,26 +112,26 @@
|
||||
// If using the basic editor, set the cron string based on the selected options
|
||||
if (executeEvery === 'second') {
|
||||
if (seconds > 0) {
|
||||
nschedule = `*/${seconds} * * * *`
|
||||
nschedule = `*/${seconds} * * * * *`
|
||||
} else {
|
||||
nschedule = `* * * * *`
|
||||
nschedule = `* * * * * *`
|
||||
}
|
||||
} else if (executeEvery === 'minute') {
|
||||
if (minutes > 0) {
|
||||
nschedule = `0 */${minutes} * * *`
|
||||
nschedule = `0 */${minutes} * * * *`
|
||||
} else {
|
||||
nschedule = `* * * * *`
|
||||
nschedule = `* * * * * *`
|
||||
}
|
||||
} else if (executeEvery === 'hour') {
|
||||
if (hours > 0) {
|
||||
nschedule = `0 0 */${hours} * *`
|
||||
nschedule = `0 0 */${hours} * * *`
|
||||
} else {
|
||||
nschedule = `* * * * *`
|
||||
nschedule = `* * * * * *`
|
||||
}
|
||||
} else if (executeEvery === 'day-month') {
|
||||
nschedule = `0 ${s_AtUTCMinutes} ${s_AtUTCHours} ${s_daysOfMonth} *`
|
||||
nschedule = `0 ${s_AtUTCMinutes} ${s_AtUTCHours} ${s_daysOfMonth} * *`
|
||||
} else if (executeEvery === 'month') {
|
||||
nschedule = `0 ${s_AtUTCMinutes} ${s_AtUTCHours} ${s_daysOfMonth} ${s_months}`
|
||||
nschedule = `0 ${s_AtUTCMinutes} ${s_AtUTCHours} ${s_daysOfMonth} ${s_months} *`
|
||||
} else if (executeEvery === 'day-week') {
|
||||
nschedule = `0 ${s_AtUTCMinutes} ${s_AtUTCHours} * * ${s_daysOfWeek}`
|
||||
}
|
||||
@@ -214,7 +214,7 @@
|
||||
type="text"
|
||||
id="cron-schedule"
|
||||
name="cron-schedule"
|
||||
placeholder="*/30 * * * *"
|
||||
placeholder="0 0 */1 * * *"
|
||||
bind:value={schedule}
|
||||
{disabled}
|
||||
/>
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
$primarySchedule = {
|
||||
summary: '',
|
||||
args: {},
|
||||
cron: '0 0 0 /1 * * *',
|
||||
cron: '0 0 */1 * * *',
|
||||
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
enabled: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user