diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 2f359d861..616d0693c 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -827,12 +827,12 @@ const message = { perMonth: '每月', perWeek: '每周', perHour: '每小時', - perNDay: '每隔 N 日', + perNDay: '每 N 日', perDay: '每天', - perNHour: '每隔 N 時', - perNMinute: '每隔 N 分鐘', - perNSecond: '每隔 N 秒', - per: '每隔', + perNHour: '每 N 時', + perNMinute: '每 N 分鐘', + perNSecond: '每 N 秒', + per: '每', handle: '執行', day: '日', monday: '周一', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 4c1fde1d0..3106b4b95 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -828,12 +828,12 @@ const message = { perMonth: '每月', perWeek: '每周', perHour: '每小时', - perNDay: '每隔 N 日', + perNDay: '每 N 日', perDay: '每天', - perNHour: '每隔 N 时', - perNMinute: '每隔 N 分钟', - perNSecond: '每隔 N 秒', - per: '每隔', + perNHour: '每 N 时', + perNMinute: '每 N 分钟', + perNSecond: '每 N 秒', + per: '每', handle: '执行', day: '日', monday: '周一', diff --git a/frontend/src/views/cronjob/helper.ts b/frontend/src/views/cronjob/helper.ts index 80ceb0b59..e0bb3684b 100644 --- a/frontend/src/views/cronjob/helper.ts +++ b/frontend/src/views/cronjob/helper.ts @@ -92,12 +92,10 @@ export function transObjToSpec(specType: string, week, day, hour, minute, second case 'perWeek': return `${minute} ${hour} * * ${week}`; case 'perNDay': - day = Number(day) + 1 + ''; return `${minute} ${hour} */${day} * *`; case 'perDay': return `${minute} ${hour} * * *`; case 'perNHour': - hour = Number(hour) + 1 + ''; return `${minute} */${hour} * * *`; case 'perHour': return `${minute} * * * *`; @@ -141,13 +139,13 @@ export function transSpecToObj(spec: string) { } if (specs[1].indexOf('*/') !== -1) { specItem.specType = 'perNHour'; - specItem.hour = Number(specs[1].replaceAll('*/', '')) - 1; + specItem.hour = Number(specs[1].replaceAll('*/', '')); return specItem; } specItem.hour = Number(specs[1]); if (specs[2].indexOf('*/') !== -1) { specItem.specType = 'perNDay'; - specItem.day = Number(specs[2].replaceAll('*/', '')) - 1; + specItem.day = Number(specs[2].replaceAll('*/', '')); return specItem; } if (specs[2] !== '*') {